THomas,
I don't understand the purpose of the following function. Why would you use
bytes 0 - 7 and 16 - 23 of a 32 byte buffer to create a UUID? The only place I
have found this function used is in converting from ValueBytes to ValueUuid.
Also, why would you assume a buffer less than 2 bytes in length is a string
containing a UUID?
-James
> /**
> * Get or create a UUID for the given 32 bytes.
> *
> * @param binary the byte array (must be at least 32 bytes long)
> * @return the UUID
> */
> public static ValueUuid get(byte[] binary) {
> if (binary.length < 32) {
> return get(Utils.convertBytesToString(binary));
> }
> long high = Utils.readLong(binary, 0);
> long low = Utils.readLong(binary, 16);
> return (ValueUuid) Value.cache(new ValueUuid(high, low));
> }
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.