@Override public Value readValue(ByteBuffer buff) { return ValueUuid.get(buff.getLong(), buff.getLong()); }
/** * Get or create a UUID for the given 16 bytes. * * @param binary the byte array (must be at least 16 bytes long) * @return the UUID */ public static ValueUuid get(byte[] binary) { if (binary.length < 16) { return get(StringUtils.convertBytesToHex(binary)); } long high = Utils.readLong(binary, 0); long low = Utils.readLong(binary, 8); return (ValueUuid) Value.cache(new ValueUuid(high, low)); }
v = buff == null ? (Value) ValueNull.INSTANCE : ValueUuid.get(buff); break;
} else if (x instanceof UUID) { UUID u = (UUID) x; return ValueUuid.get(u.getMostSignificantBits(), u.getLeastSignificantBits()); } else if (x instanceof Object[]) {
return ValueJavaObject.getNoCopy(null, readBytes()); case Value.UUID: return ValueUuid.get(readLong(), readLong()); case Value.BOOLEAN: return ValueBoolean.get(readBoolean());