org.apache.catalina.tribes.util
Class UUIDGenerator
java.lang.Object
org.apache.catalina.tribes.util.UUIDGenerator
public class UUIDGenerator
- extends Object
simple generation of a UUID
- Version:
- 1.0
- Author:
- Filip Hanik
Method Summary |
static void |
nextBytes(byte[] into,
int offset,
int length,
Random r)
Same as java.util.Random.nextBytes except this one we dont have to allocate a new byte array |
static byte[] |
randomUUID(boolean secure)
|
static byte[] |
randomUUID(boolean secure,
byte[] into,
int offset)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sm
protected static final StringManager sm
UUID_LENGTH
public static final int UUID_LENGTH
- See Also:
- Constant Field Values
UUID_VERSION
public static final int UUID_VERSION
- See Also:
- Constant Field Values
BYTES_PER_INT
public static final int BYTES_PER_INT
- See Also:
- Constant Field Values
BITS_PER_BYTE
public static final int BITS_PER_BYTE
- See Also:
- Constant Field Values
secrand
protected static SecureRandom secrand
rand
protected static Random rand
UUIDGenerator
public UUIDGenerator()
randomUUID
public static byte[] randomUUID(boolean secure)
randomUUID
public static byte[] randomUUID(boolean secure,
byte[] into,
int offset)
nextBytes
public static void nextBytes(byte[] into,
int offset,
int length,
Random r)
- Same as java.util.Random.nextBytes except this one we dont have to allocate a new byte array
- Parameters:
into
- byte[]offset
- intlength
- intr
- Random
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.