@Override public void readFrom(InputStream stream, ORecordVersion version) throws IOException { final ODistributedVersion distributedVersion = (ODistributedVersion) version; distributedVersion.counter = OBinaryProtocol.bytes2int(stream); distributedVersion.timestamp = OBinaryProtocol.bytes2long(stream); distributedVersion.macAddress = OBinaryProtocol.bytes2long(stream); }
@Override public int readFrom(byte[] iStream, int pos, ORecordVersion version) { final ODistributedVersion distributedVersion = (ODistributedVersion) version; int len = 0; distributedVersion.counter = OBinaryProtocol.bytes2int(iStream, pos + len); len += OBinaryProtocol.SIZE_INT; distributedVersion.timestamp = OBinaryProtocol.bytes2long(iStream, pos + len); len += OBinaryProtocol.SIZE_LONG; distributedVersion.macAddress = OBinaryProtocol.bytes2long(iStream, pos + len); len += OBinaryProtocol.SIZE_LONG; return len; }