commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joerg Schaible (Commented) (JIRA)" <>
Subject [jira] [Commented] (LANG-778) Add UUIDUtils.toByteArray and UUIDUtils.fromByteArray
Date Wed, 23 Nov 2011 16:35:39 GMT


Joerg Schaible commented on LANG-778:

bq. Is there a reason for choosing to convert the longs in the way that you did?

While the DBs not necessarily support UUID as native type, they support the generation of
UUIDs with built-in functions, e.g. Oracle delivers SYS_GUID() and HSQLDB provides UUID().
Those methods return a sequence of 16 bytes, Oracle stores them as RAW(16), HSQLDB uses BINARY(16),
i.e. they return a UUID in its pure binary form.

bq. toByteArray()
bq. fromBytes()

I'll take toBytes()/fromBytes().

> Add UUIDUtils.toByteArray and UUIDUtils.fromByteArray
> -----------------------------------------------------
>                 Key: LANG-778
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Joerg Schaible
>            Assignee: Joerg Schaible
>            Priority: Minor
>         Attachments: LANG-778.diff
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> A UUID represents 16 bytes. In some situation (e.g. using DBs that do not have native
support for the type UUID) it is necessary to use directly the bytes. The JDK does not support
the transformation from UUID to bytes and back, therefore I'd like to add UUIDUtils with the
two proposed methods.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message