Simplediskcache Inputstream Bad Number Format
I'm using the SimpleDiskCache code (github link) to cache a few video files to disk for an Android app I'm working. Here's how I put the video file to cache: OutputStream fil = v
Solution 1:
It seems that the input stream is closed before being used. You have to comment the snapshot.close() call at line 59 and close the inputstream yourself when you're done.
public InputStreamEntry getInputStream(String key) throws IOException {
DiskLruCache.Snapshot snapshot = diskLruCache.get(toInternalKey(key));
if (snapshot == null)
return null;
try {
return new InputStreamEntry(snapshot, readMetadata(snapshot));
} finally {
//snapshot.close();
}
}
Post a Comment for "Simplediskcache Inputstream Bad Number Format"