public void deserialize(final ODocument document, final BytesContainer bytes) {
final String className = readString(bytes);
if (className.length() != 0)
ODocumentInternal.fillClassNameIfNeeded(document, className);
String fieldName;
OType type;
Object value;
int size = OVarIntSerializer.readAsInteger(bytes);
while ((size--) > 0) {
fieldName = readString(bytes);
type = readOType(bytes);
if (type == null) {
value = null;
} else {
value = deserializeValue(bytes, type, document);
}
if (ODocumentInternal.rawContainsField(document, fieldName)) {
continue;
}
ODocumentInternal.rawField(document, fieldName, value, type);
}
ORecordInternal.clearSource(document);
}