Fix crash/OOM in DiskBasedCache

DiskBasedCache.writeHeader() can throw an IOException and swallow it. This causes the
cache entry to be partially written followed by the entry's data. When reading back,
it is possible to read back the data segment (garbled part) when attempting to parse
the cache header.

Change-Id: I3022ca1566bc60e5869bb4ec384c866b4ba5c1c5
1 file changed