com.novell.nds.dirxml.driver.xds.util
Class GUIDUtil

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.xds.util.GUIDUtil

public abstract class GUIDUtil
extends Object

A collection of eDirectory Globally Unique Identifier (GUID) formatting methods.


Field Summary
static char DELIMITER_BEGIN
          '{'
static char DELIMITER_END
          '}'
static char DELIMITER_SECTION
          '-'
 
Constructor Summary
GUIDUtil()
           
 
Method Summary
static String binGuidToString(byte[] guid)
          Method to change a GUID from a byte array into a cannonical string representation.
static void delimit(String undelimitedGUID, StringBuffer buffer)
          Delimits an undelimited GUID.
static boolean isDelimiter(char c)
          Is the passed character a GUID delimeter?
static boolean isValid(String guid)
          Determines the validity of the passed GUID.
static byte[] stringGuidtoBin(String guid)
          Method to change a GUID from a cannonical string representation into a byte array.
static String stripDelimiters(String guid)
          Strips delimiters from a delimited GUID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELIMITER_BEGIN

public static final char DELIMITER_BEGIN
'{'

See Also:
Constant Field Values

DELIMITER_END

public static final char DELIMITER_END
'}'

See Also:
Constant Field Values

DELIMITER_SECTION

public static final char DELIMITER_SECTION
'-'

See Also:
Constant Field Values
Constructor Detail

GUIDUtil

public GUIDUtil()
Method Detail

isDelimiter

public static boolean isDelimiter(char c)
Is the passed character a GUID delimeter?

Parameters:
c - the characterin question
Returns:
true if it is; false otherwise

stripDelimiters

public static String stripDelimiters(String guid)
Strips delimiters from a delimited GUID.

Parameters:
guid - a delimited GUID; may be null
Returns:
an equivalent, undelimited GUID

delimit

public static void delimit(String undelimitedGUID,
                           StringBuffer buffer)
Delimits an undelimited GUID.

Parameters:
undelimitedGUID - may be null
buffer - may be null; if not null, it will contain an equivalent, delimited GUID after this method is invoked

isValid

public static boolean isValid(String guid)
Determines the validity of the passed GUID.

Parameters:
guid - may be null
Returns:
true if it's valid; false otherwise

binGuidToString

public static String binGuidToString(byte[] guid)
Method to change a GUID from a byte array into a cannonical string representation.

Parameters:
guid - must not be null
Returns:
the canonical string representation; will not return null

stringGuidtoBin

public static byte[] stringGuidtoBin(String guid)
Method to change a GUID from a cannonical string representation into a byte array.

Parameters:
guid - canonical string representation; must not be null
Returns:
will not return null;