return new CacheItem( storeKey, url, expires, data.length, pDataStore.size() );
}
private void writeDataToStore( ByteVectorWrapper dataVector, byte[] data ) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
GZIPOutputStream gzipStream = new GZIPOutputStream( baos, 6, GZIPOutputStream.MAX_LOG2_WINDOW_LENGTH );
gzipStream.write( data );
gzipStream.close();
byte[] compressedData = baos.toByteArray();
// Write compressed size
int compressedSize = compressedData.length;
int originalSize = data.length;