Package org.ldaptive.ad
Class GlobalIdentifier
java.lang.Object
org.ldaptive.ad.GlobalIdentifier
Class to represent an active directory GUID. Provides conversion from binary to string and vice versa.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]
getBytes
(ByteBuffer buffer, boolean bigEndian) Reads bytes from the supplied byte buffer.private static void
putBytes
(ByteBuffer buffer, byte[] bytes, boolean bigEndian) Writes a long into the supplied byte buffer.static byte[]
Converts the supplied GUID to it's binary format.static String
toString
(byte[] guid) Converts the supplied GUID to it's string format.
-
Constructor Details
-
GlobalIdentifier
private GlobalIdentifier()Default constructor.
-
-
Method Details
-
toString
Converts the supplied GUID to it's string format.- Parameters:
guid
- to convert- Returns:
- string format of the GUID
-
toBytes
Converts the supplied GUID to it's binary format.- Parameters:
guid
- to convert- Returns:
- binary format of the GUID
-
getBytes
Reads bytes from the supplied byte buffer. The byte buffer limit must be set appropriately by the caller.- Parameters:
buffer
- to read bytes frombigEndian
- whether to return the bytes as big endian- Returns:
- long value
-
putBytes
Writes a long into the supplied byte buffer. The byte buffer limit must be set appropriately by the caller.- Parameters:
buffer
- to write long tobytes
- to writebigEndian
- whether to write the bytes as big endian
-