|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDbStorage.DataConvertion
This class is used to convert some data types to their representation as a byte array or viceversa.
Constructor Summary | |
DataConvertion()
|
Method Summary | |
static double |
bytesToDouble(byte[] value)
Converts a double floating point number to a byte array. |
static long |
bytesToLong(byte[] value)
Converts a byte array to a long integer. |
static java.lang.String |
bytesToString(byte[] value)
Converts a byte array to a String . |
static byte[] |
doubleToBytes(double value)
Converts a double floating point number to a byte array. |
static byte[] |
longToBytes(long value)
Converts a long integer to a byte array. |
static byte[] |
stringToBytes(java.lang.String value)
Converts a String to a byte array. |
static byte[] |
stringToBytes(java.lang.String value,
int off,
int len)
Converts a String to a byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataConvertion()
Method Detail |
public static byte[] longToBytes(long value)
long
integer to a byte array.
public static long bytesToLong(byte[] value)
long
integer.
public static byte[] doubleToBytes(double value)
double
floating point number to a byte array.
public static double bytesToDouble(byte[] value)
double
floating point number to a byte array.
public static byte[] stringToBytes(java.lang.String value)
String
to a byte array.
public static byte[] stringToBytes(java.lang.String value, int off, int len)
String
to a byte array.
public static java.lang.String bytesToString(byte[] value)
String
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |