Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


oracle.ldap.util
Class NativeGuid

java.lang.Object
  extended by oracle.ldap.util.NativeGuid

All Implemented Interfaces:
java.lang.Cloneable

public final class NativeGuid
extends java.lang.Object
implements java.lang.Cloneable

This class represents GUIDs (Globally Unique Identifiers), or object IDs. This is an immutable class.


Field Summary
static int GUID_BYTE_SIZE
          number of bytes required for GUID
static int GUID_STRING_SIZE
          number of bytes required for the string representation of GUID
static int GUID_STRING_SIZE_NEW
          orig string size

 

Constructor Summary
NativeGuid()
          Default constructor.
NativeGuid(byte[] byte_array)
          Construct a NativeGuid from a byte array
NativeGuid(java.lang.String guid)
          Construct a NativeGuid from a string

 

Method Summary
 java.lang.Object clone()
          Clones a NativeGuid object
static java.lang.String compactGuidString(java.lang.String s)
          Converts the larger version of the GUID String to a more compact version.
 boolean equals(java.lang.Object o)
          Compare the NativeGuid in a string format
static java.lang.String expandGuidString(java.lang.String s)
          Expands the compact version of the GUID String to a more readable version.
 byte[] getBytes()
          return the 'byte' form of the NativeGuid
 int hashCode()
          return the hashcode of this object for hashing purposes
static void main(java.lang.String[] argv)
          main function used for testing
static NativeGuid newInstance()
          generates a new NativeGuid
 java.lang.String toString()
          Retrieves the NativeGuid in a string format

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

GUID_BYTE_SIZE

public static final int GUID_BYTE_SIZE
number of bytes required for GUID
See Also:
Constant Field Values

GUID_STRING_SIZE

public static final int GUID_STRING_SIZE
number of bytes required for the string representation of GUID
See Also:
Constant Field Values

GUID_STRING_SIZE_NEW

public static final int GUID_STRING_SIZE_NEW
orig string size
See Also:
Constant Field Values

Constructor Detail

NativeGuid

public NativeGuid()
Default constructor.

NativeGuid

public NativeGuid(java.lang.String guid)
Construct a NativeGuid from a string
Parameters:
guid - a string representation of a Globally Unique Identifier

NativeGuid

public NativeGuid(byte[] byte_array)
Construct a NativeGuid from a byte array
Parameters:
byte_array - an array of bytes representing a GUID. This constructor will validate the length of the byte array before proceeding.

Method Detail

compactGuidString

public static java.lang.String compactGuidString(java.lang.String s)
Converts the larger version of the GUID String to a more compact version.

expandGuidString

public static java.lang.String expandGuidString(java.lang.String s)
Expands the compact version of the GUID String to a more readable version.

newInstance

public static NativeGuid newInstance()
generates a new NativeGuid
Returns:
a new instance of the NativeGuid class

getBytes

public byte[] getBytes()
return the 'byte' form of the NativeGuid
Returns:
a byte array containing the NativeGuid bytes

toString

public final java.lang.String toString()
Retrieves the NativeGuid in a string format
Overrides:
toString in class java.lang.Object
Returns:
the NativeGuid in a string format

equals

public boolean equals(java.lang.Object o)
Compare the NativeGuid in a string format
Overrides:
equals in class java.lang.Object
Returns:
true if they are equal, false otherwise

hashCode

public int hashCode()
return the hashcode of this object for hashing purposes
Overrides:
hashCode in class java.lang.Object
Returns:
the integer hashcode of the NativeGuid

clone

public java.lang.Object clone()
Clones a NativeGuid object
Overrides:
clone in class java.lang.Object
Returns:
a clone of an existing NativeGuid object

main

public static void main(java.lang.String[] argv)
main function used for testing

Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.