/** * Returns an instance of uuid. Useful for when you read out of cassandra * you are getting a byte[] that needs to be converted into a TimeUUID. * * @param uuid the uuid * @return the java.util.uuid */ public static java.util.UUID toUUID(byte[] uuid) { return uuid(uuid, 0); }
@Test public void testTimeUUIDAsByteBuffer() { UUID expectedUuid = TimeUUIDUtils.getUniqueTimeUUIDinMillis(); UUID actualUuid = TimeUUIDUtils.uuid(TimeUUIDUtils.asByteBuffer(expectedUuid)); assertEquals(expectedUuid, actualUuid); }
/** * Returns an instance of uuid. Useful for when you read out of cassandra * you are getting a byte[] that needs to be converted into a TimeUUID. * * @param uuid the uuid * @return the java.util.uuid */ public static java.util.UUID toUUID(byte[] uuid) { return uuid(uuid, 0); }
/** * Returns an instance of uuid. Useful for when you read out of cassandra * you are getting a byte[] that needs to be converted into a TimeUUID. * * @param uuid the uuid * @return the java.util.uuid */ public static java.util.UUID toUUID(byte[] uuid) { return uuid(uuid, 0); }