ObjectInputStream ois = null;
try {
ByteArrayInputStream bais = new ByteArrayInputStream(data);
BufferedInputStream bis = new BufferedInputStream(bais);
ois=new ObjectInputStream(bis);
DiskCacheObject obj = (DiskCacheObject) ois.readObject();
obj.getCacheObject().resetRefCount();
return obj;
} catch (IOException e) {
throw new IllegalStateException("An exception occured when reading from the disk cache." +
" Reason: " + e.getMessage());
} catch (ClassNotFoundException e) {