fromBinaryInfo = basicOrReferenceInput.fromBinary(binary, offset);
} catch (Exception exception) {
throw new IOException(exception);
}
offset = fromBinaryInfo.getEndOffset();
final ObjectAndPersistInfo readObjectAndItsClassInfo = fromBinaryInfo
.getObjectAndPersistInfo();
// FIXMELUC x needed ? why not: cause an error if have this test
// if (!readObjectAndItsClassInfo.isValueDefined()) {
// throw new IOException("value must be defined");
// }
if (fromBinaryInfo.isReferenceRead()) {
final ObjectClassInfoAndDeclared readObjectClassInfoAndDeclared =
/**/new ObjectClassInfoAndDeclared(readObjectAndItsClassInfo,
readObjectAndItsClassInfo.objectClassInfo);
// ASSERTX
assert objectAndPersistInfo != null : OBJECT_NOT_DEFINED;
final boolean accepted = objectAndPersistInfo
.addSonReadObjectByInputStream(
readObjectClassInfoAndDeclared, unshared);
if (!accepted) {
throw new InvalidObjectException(
"cannot read back reference as unshared");
}
}
basicOrReferenceInput.free(fromBinaryInfo);
if (LOGGER.debugEnabled) {
LOGGER.debug("read object "
+ readObjectAndItsClassInfo.objectClassInfo);
}
return readObjectAndItsClassInfo.getObject();
}