public class UUIDGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BITS_PER_BYTE |
static int |
BYTES_PER_INT |
protected static Random |
rand |
protected static SecureRandom |
secrand |
protected static StringManager |
sm |
static int |
UUID_LENGTH |
static int |
UUID_VERSION |
Constructor and Description |
---|
UUIDGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
nextBytes(byte[] into,
int offset,
int length,
Random r)
Same as java.util.Random.nextBytes except this one we don't have to allocate a new byte array
|
static byte[] |
randomUUID(boolean secure) |
static byte[] |
randomUUID(boolean secure,
byte[] into,
int offset) |
protected static final StringManager sm
public static final int UUID_LENGTH
public static final int UUID_VERSION
public static final int BYTES_PER_INT
public static final int BITS_PER_BYTE
protected static SecureRandom secrand
protected static Random rand
public static byte[] randomUUID(boolean secure)
public static byte[] randomUUID(boolean secure, byte[] into, int offset)
public static void nextBytes(byte[] into, int offset, int length, Random r)
into
- byte[]offset
- intlength
- intr
- RandomCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.