net.jxta.search.util
Class UuidService

java.lang.Object
  |
  +--net.jxta.search.util.UuidService

public class UuidService
extends java.lang.Object

This class can create 16-byte globally-unique identifiers, useful for identifying network messages or tasks that propagate through a network of machines.


Constructor Summary
UuidService()
          Create and initialize the uuid-generation variables.
 
Method Summary
 byte[] getUuid()
          Get a 16-byte globally-unique identifier.
static java.lang.String hexify(byte[] buf)
          The getUuid method returns an array of bytes, which is convenient for writing out the uuid to the network, but sometimes it is useful to print it to console or log for debugging purposes or to use it as a key in a hashtable, so this method converts the uuid to a printable string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UuidService

public UuidService()
Create and initialize the uuid-generation variables.
Method Detail

getUuid

public byte[] getUuid()
Get a 16-byte globally-unique identifier.

hexify

public static java.lang.String hexify(byte[] buf)
The getUuid method returns an array of bytes, which is convenient for writing out the uuid to the network, but sometimes it is useful to print it to console or log for debugging purposes or to use it as a key in a hashtable, so this method converts the uuid to a printable string.