final long timer = OProfiler.getInstance().startChrono();
final ORID rootRid = new ORecordId();
try {
final OMemoryInputStream stream = new OMemoryInputStream(iStream);
byte protocolVersion = stream.peek();
if (protocolVersion != -1) {
// @COMPATIBILITY BEFORE 0.9.25
stream.getAsByte();
if (protocolVersion != CURRENT_PROTOCOL_VERSION)
throw new OSerializationException(
"The index has been created with a previous version of OrientDB. Soft transitions between version is a featured supported since 0.9.25. In order to use it with this version of OrientDB you need to export and import your database. "
+ protocolVersion + "<->" + CURRENT_PROTOCOL_VERSION);
}
rootRid.fromStream(stream.getAsByteArrayFixed(ORecordId.PERSISTENT_SIZE));
size = stream.getAsInteger();
if (protocolVersion == -1)
// @COMPATIBILITY BEFORE 0.9.25
lastPageSize = stream.getAsShort();
else
lastPageSize = stream.getAsInteger();
serializerFromStream(stream);
// LOAD THE ROOT OBJECT AFTER ALL
if (rootRid.isValid())