diff options
author | Ficus Kirkpatrick <ficus@android.com> | 2015-05-10 10:39:33 -0700 |
---|---|---|
committer | Ficus Kirkpatrick <ficus@android.com> | 2015-05-10 10:44:53 -0700 |
commit | eaba1ab9224d30b2d3dba661284dd97bfc91ac11 (patch) | |
tree | a55d3a65cd854cdf98db6e7ad3d5235bbfee6904 /src/main | |
parent | 564c635c6a5303abe746850518cd6997fc7229a5 (diff) | |
download | volley-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')
-rw-r--r-- | src/main/java/com/android/volley/toolbox/DiskBasedCache.java | 2 |
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); |