aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/android/volley/toolbox
diff options
context:
space:
mode:
authorFicus Kirkpatrick <ficus@android.com>2015-05-10 10:39:33 -0700
committerFicus Kirkpatrick <ficus@android.com>2015-05-10 10:44:53 -0700
commiteaba1ab9224d30b2d3dba661284dd97bfc91ac11 (patch)
treea55d3a65cd854cdf98db6e7ad3d5235bbfee6904 /src/main/java/com/android/volley/toolbox
parent564c635c6a5303abe746850518cd6997fc7229a5 (diff)
downloadvolley-eaba1ab9224d30b2d3dba661284dd97bfc91ac11.tar.gz
Read from disk with a BufferedInputStream.
Missed a spot in the last commit. All disk I/O should now be buffered.
Diffstat (limited to 'src/main/java/com/android/volley/toolbox')
-rw-r--r--src/main/java/com/android/volley/toolbox/DiskBasedCache.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/android/volley/toolbox/DiskBasedCache.java b/src/main/java/com/android/volley/toolbox/DiskBasedCache.java
index fbc4b15..c76d39a 100644
--- a/src/main/java/com/android/volley/toolbox/DiskBasedCache.java
+++ b/src/main/java/com/android/volley/toolbox/DiskBasedCache.java
@@ -114,7 +114,7 @@ public class DiskBasedCache implements Cache {
File file = getFileForKey(key);
CountingInputStream cis = null;
try {
- cis = new CountingInputStream(new FileInputStream(file));
+ cis = new CountingInputStream(new BufferedInputStream(new FileInputStream(file)));
CacheHeader.readHeader(cis); // eat header
byte[] data = streamToBytes(cis, (int) (file.length() - cis.bytesRead));
return entry.toCacheEntry(data);