[
https://issues.apache.org/jira/browse/LANG-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155881#comment-13155881
]
Sebb commented on LANG-778:
---------------------------
ByteUtils could just use the same endianness as DataOutputStream.writeLong(),
which is often suggested as a method for converting long to bytes.
BTW, why did you decide to use high byte first?
Is there a standard for representing UUIDs in DBs, or is it just a question of
having some method of converting the UUID into a data format that can be stored
in a database?
i.e. so long as the process is reversible, it does not matter what the DB
format is?
I think the reason for the choice needs to be documented.
> Add UUIDUtils.toByteArray and UUIDUtils.fromByteArray
> -----------------------------------------------------
>
> Key: LANG-778
> URL: https://issues.apache.org/jira/browse/LANG-778
> 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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira