summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFicus Kirkpatrick <ficus@android.com>2015-05-10 18:08:21 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-10 18:08:21 +0000
commiteab2d113ac6452288e54d9279530f04eb43aa00e (patch)
treea55d3a65cd854cdf98db6e7ad3d5235bbfee6904
parente367405c0308598e4708d56d090689e9c84f1e18 (diff)
parent69d7dcbab69c474129bd355298263d729d464f25 (diff)
downloadvolley-eab2d113ac6452288e54d9279530f04eb43aa00e.tar.gz
am 69d7dcba: Merge "Read from disk with a BufferedInputStream."
* commit '69d7dcbab69c474129bd355298263d729d464f25': Read from disk with a BufferedInputStream.
-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);