/** * Converts bytes in the buffer to a uuid by reading from the current position to the limit. * * @param encoded buffer containing DER-encoded data where the buffer is positioned at the start of uuid bytes and * the limit is set beyond the last byte of uuid data. * * @return decoded bytes as a uuid. */ public static UUID decode(final ByteBuffer encoded) { final ByteBuffer buffer = ByteBuffer.wrap(readBuffer(encoded)); final long mostSig = buffer.getLong(); final long leastSig = buffer.getLong(); return new UUID(mostSig, leastSig); }
/** * Converts bytes in the buffer to a uuid by reading from the current position to the limit. * * @param encoded buffer containing DER-encoded data where the buffer is positioned at the start of uuid bytes and * the limit is set beyond the last byte of uuid data. * * @return decoded bytes as a uuid. */ public static UUID decode(final ByteBuffer encoded) { final ByteBuffer buffer = ByteBuffer.wrap(readBuffer(encoded)); final long mostSig = buffer.getLong(); final long leastSig = buffer.getLong(); return new UUID(mostSig, leastSig); }
/** * Converts bytes in the buffer to a uuid by reading from the current position to the limit. * * @param encoded buffer containing DER-encoded data where the buffer is positioned at the start of uuid bytes and * the limit is set beyond the last byte of uuid data. * * @return decoded bytes as a uuid. */ public static UUID decode(final ByteBuffer encoded) { final ByteBuffer buffer = ByteBuffer.wrap(readBuffer(encoded)); final long mostSig = buffer.getLong(); final long leastSig = buffer.getLong(); return new UUID(mostSig, leastSig); }