com.sleepycat.db.internal
Class DbUtil
public
class
DbUtil
extends Object
DbUtil is a simple class that holds a few static utility functions other
parts of the package share and that don't have a good home elsewhere. (For
now, that's limited to byte-array-to-int conversion and back.)
Method Summary |
static int | array2int(byte[] arr, int offset)
Get the u_int32_t stored beginning at offset "offset" into
array "arr". |
static String | byteArrayToString(byte[] barr)
Convert a byte array to a concise, readable string suitable
for use in toString methods of the *Stat classes.
|
static int | default_lorder() |
static void | int2array(int n, byte[] arr, int offset)
Store the specified u_int32_t, with endianness appropriate to
the platform we're running on, into four consecutive bytes of
the specified byte array, starting from the specified offset. |
static String | objectArrayToString(Object[] arr, String name)
Convert an object array to a string, suitable for use in
toString methods of the *Stat classes.
|
public static int array2int(byte[] arr, int offset)
Get the u_int32_t stored beginning at offset "offset" into
array "arr". We have to do the conversion manually since it's
a C-native int, and we're not really supposed to make this
kind of cast in Java.
Returns: Description of the Return Value
public static String byteArrayToString(byte[] barr)
Convert a byte array to a concise, readable string suitable
for use in toString methods of the *Stat classes.
Returns: Description of the Return Value
public static int default_lorder()
public static void int2array(int n, byte[] arr, int offset)
Store the specified u_int32_t, with endianness appropriate to
the platform we're running on, into four consecutive bytes of
the specified byte array, starting from the specified offset.
public static String objectArrayToString(Object[] arr, String name)
Convert an object array to a string, suitable for use in
toString methods of the *Stat classes.
Returns: Description of the Return Value