@Test public void testToBytesNull() { assertNull(IdUtils.toBytes(null)); }
public static byte[] toBytes(final UUID id) { if (id == null) { return null; } final byte[] buffer = new byte[16]; final ByteBuffer bb = ByteBuffer.wrap(buffer); bb.putLong(id.getMostSignificantBits()); bb.putLong(id.getLeastSignificantBits()); return buffer; }
IdUtils { public static byte[] toBytes(final UUID id) { if (id == null) { return null; } final byte[] buffer = new byte[16]; final ByteBuffer bb = ByteBuffer.wrap(buffer); bb.putLong(id.getMostSignificantBits()); bb.putLong(id.getLeastSignificantBits()); return buffer; } }
IdUtils { public static byte[] toBytes(final UUID id) { if (id == null) { return null; } final byte[] buffer = new byte[16]; final ByteBuffer bb = ByteBuffer.wrap(buffer); bb.putLong(id.getMostSignificantBits()); bb.putLong(id.getLeastSignificantBits()); return buffer; } IdUtils(); }
IdUtils { public static byte[] toBytes(final UUID id) { if (id == null) { return null; } final byte[] buffer = new byte[16]; final ByteBuffer bb = ByteBuffer.wrap(buffer); bb.putLong(id.getMostSignificantBits()); bb.putLong(id.getLeastSignificantBits()); return buffer; } IdUtils(); static UUID create(); static UUID tryParse(final String str); static byte[] toBytes(final UUID id); static UUID fromBytes(final byte[] b); }
IdUtils { public static byte[] toBytes(final UUID id) { if (id == null) { return null; } final byte[] buffer = new byte[16]; final ByteBuffer bb = ByteBuffer.wrap(buffer); bb.putLong(id.getMostSignificantBits()); bb.putLong(id.getLeastSignificantBits()); return buffer; } IdUtils(); static UUID create(); static UUID tryParse(final String str); static byte[] toBytes(final UUID id); static UUID fromBytes(final byte[] b);  }