ObjectIONotSerializableException, ObjectIOClassNotFoundException,
ObjectIODataRecordNotFoundException,
ObjectIODataCorruptedException,
ObjectIOTooBigForSerializationException {
final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
ObjectAndPersistInfo toWrite;
toWrite = keptInMemorysubstituteObject(objectAndPersistInfo);
if (toWrite == null) {
toWrite = substituteObject(objectAndPersistInfo);
if (toWrite == null) {
toWrite = objectAndPersistInfo;
}
}
if (!objectAndPersistInfo.isLoadedOrNotAProxy()) {
throw new ObjectIOException("can not store not loaded object");
}
final DataRecordIdentifier dataRecordIdentifier = toWrite.dataRecordIdentifier;
// /**/getKnownDataRecordIdentifierAssociatedToObject(toWrite);
if (logger.debugEnabled) {
logger.debug("begin store: data record " + dataRecordIdentifier);
}
/* the object class can be different than object.getClass() */
final IObjectOutput objectOutput;
objectOutput = getObjectOutput(classInfo);
assert !toWrite.isSubstituted();
objectOutput.prepareWrite(toWrite);
final int byteSizeForObject = objectOutput.byteSize(toWrite,
HEADER_DATA_SIZE);
/*