gov.lbl.dsd.sea.nio.util
Class UUIDUtil
java.lang.Object
gov.lbl.dsd.sea.nio.util.UUIDUtil
- public class UUIDUtil
- extends Object
Utilities to create Universally Unique Identifiers as defined by IETF standards.
- Version:
- $Revision: 1.2 $, $Date: 2004/07/27 00:18:19 $
Method Summary |
static String |
createRandomUUID(Random generator)
Returns a type 4 (pseudo randomly generated) Universally Unique Identifier
as defined by IETF standards. |
createRandomUUID
public static String createRandomUUID(Random generator)
- Returns a type 4 (pseudo randomly generated) Universally Unique Identifier
as defined by IETF standards. Example UUID:
e96d0caf-76f4-44a9-904e-cad4c0f93b22
.
The returned UUID consists of 36 characters. Note that this method is thread-safe.
See draft-leach-uuids-guids-01.txt
for details.
- Parameters:
generator
- -
the (pseudo) random number generator used to generate random
bytes. Set this parameter to null
to use a
built-in default secure random number generator.
- Returns:
- a randomly generated UUID.