Skip to content

Commit eaba1ab

Browse files
author
Ficus Kirkpatrick
committed
Read from disk with a BufferedInputStream.
Missed a spot in the last commit. All disk I/O should now be buffered.
1 parent 564c635 commit eaba1ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/android/volley/toolbox/DiskBasedCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public synchronized Entry get(String key) {
114114
File file = getFileForKey(key);
115115
CountingInputStream cis = null;
116116
try {
117-
cis = new CountingInputStream(new FileInputStream(file));
117+
cis = new CountingInputStream(new BufferedInputStream(new FileInputStream(file)));
118118
CacheHeader.readHeader(cis); // eat header
119119
byte[] data = streamToBytes(cis, (int) (file.length() - cis.bytesRead));
120120
return entry.toCacheEntry(data);

0 commit comments

Comments
 (0)