Modifier and Type | Field and Description |
---|---|
static byte |
FORMAT_VERSION
The format version used by this class to encode and decode a DatabaseEntry.
|
static byte |
TAG_DATABASE_ENTRY
The ASN1 tag for the DatabaseEntry type.
|
static byte |
TAG_DIRECTORY_SERVER_ENTRY
The ASN1 tag for the DirectoryServerEntry type.
|
Constructor and Description |
---|
JebFormat() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
dnToDNKey(DN dn,
int prefixRDNs)
Create a DN database key from an entry DN.
|
static long |
entryIDFromDatabase(byte[] bytes)
Decode an entry ID value from its database representation.
|
static long[] |
entryIDListFromDatabase(byte[] bytes)
Decode an array of entry ID values from its database representation.
|
static byte[] |
entryIDListToDatabase(long[] entryIDArray)
Encode an array of entry ID values to its database representation.
|
static byte[] |
entryIDToDatabase(long id)
Encode an entry ID value to its database representation.
|
static long |
entryIDUndefinedSizeFromDatabase(byte[] bytes)
Decode an entry ID count from its database representation.
|
static byte[] |
entryIDUndefinedSizeToDatabase(long count)
Encode an entry ID set count to its database representation.
|
static int |
findDNKeyParent(byte[] dnKey)
Find the length of bytes that represents the superior DN of the given
DN key.
|
static int |
findDNKeyParent(byte[] dnKey,
int offset,
int length)
Find the length of bytes that represents the superior DN of the given
DN key.
|
static int[] |
intArrayFromDatabaseBytes(byte[] bytes)
Decode a integer array using the specified byte array read from DB.
|
static long |
toLong(byte[] bytes,
int start,
int end)
Decode a long from a byte array, starting at start index and ending at end
index.
|
public static final byte FORMAT_VERSION
public static final byte TAG_DATABASE_ENTRY
public static final byte TAG_DIRECTORY_SERVER_ENTRY
public JebFormat()
public static long entryIDFromDatabase(byte[] bytes)
bytes
- The database value of the entry ID.entryIDToDatabase(long)
public static long toLong(byte[] bytes, int start, int end) throws ArrayIndexOutOfBoundsException
bytes
- The bytes value of the long.start
- the array index where to start computing the longend
- the array index exclusive where to end computing the longArrayIndexOutOfBoundsException
- if the bytes array length is less than end.public static long entryIDUndefinedSizeFromDatabase(byte[] bytes)
bytes
- The database value of the entry ID count.entryIDUndefinedSizeToDatabase(long)
public static long[] entryIDListFromDatabase(byte[] bytes)
bytes
- The raw database value, null if there is no value and
hence no entry IDs. Note that this method will throw an
ArrayIndexOutOfBoundsException if the bytes array length is
not a multiple of 8.entryIDListToDatabase(long[])
public static int[] intArrayFromDatabaseBytes(byte[] bytes)
bytes
- The byte array.public static byte[] entryIDToDatabase(long id)
id
- The entry ID value to be encoded.entryIDFromDatabase(byte[])
public static byte[] entryIDUndefinedSizeToDatabase(long count)
count
- The entry ID set count to be encoded.entryIDUndefinedSizeFromDatabase(byte[])
public static byte[] entryIDListToDatabase(long[] entryIDArray)
entryIDArray
- An array of entry ID values.entryIDListFromDatabase(byte[])
public static int findDNKeyParent(byte[] dnKey)
dnKey
- The database key value of the DN.public static int findDNKeyParent(byte[] dnKey, int offset, int length)
dnKey
- The database key value of the DN.offset
- Starting position in the database key data.length
- The length of the database key data.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.