ByteArrayInputStream bais = new ByteArrayInputStream(buf);
DataInputStream dis = new DataInputStream(bais);
long flags = dis.readLong();
if((flags & HAS_CHECKED_DATASTORE_FLAG) != 0)
hasCheckedDatastore = true;
errors = new FailureCodeTracker(false, dis);
dis.close();
} catch (ChecksumFailedException e) {
Logger.error(this, "Failed to read general progress: "+e);
// Reset general progress
this.hasCheckedDatastore = false;
this.errors = new FailureCodeTracker(false);
} catch (StorageFormatException e) {
Logger.error(this, "Failed to read general progress: "+e);
// Reset general progress
this.hasCheckedDatastore = false;
this.errors = new FailureCodeTracker(false);
}
}