public final class IdUtil extends Object
Constructor and Description |
---|
IdUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
concat(byte[] first,
byte[] second) |
static byte[] |
createId()
creates an id as a concatenation of the current time in msec
and 4 random bytes
|
static boolean |
equals(byte[] first,
byte[] second) |
static boolean |
equals(byte[] first,
byte[] second,
int len)
compares first len bytes of two byte arrays
|
static byte[] |
extract(byte[] id,
int offset,
int len)
extracts len bytes from id, the first byte to be copied is at index offset
|
static byte[] |
toId(long l)
converts the number l into a byte array
|
public static byte[] concat(byte[] first, byte[] second)
public static byte[] createId()
public static boolean equals(byte[] first, byte[] second)
public static boolean equals(byte[] first, byte[] second, int len)
public static byte[] extract(byte[] id, int offset, int len)
public static byte[] toId(long l)
Copyright © 2017 JacORB. All rights reserved.