|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdbm.helper.Conversion
public class Conversion
Miscelaneous conversion utility methods.
| Constructor Summary | |
|---|---|
Conversion()
|
|
| Method Summary | |
|---|---|
static byte[] |
convertToByteArray(byte n)
Convert a byte into a byte array. |
static byte[] |
convertToByteArray(int n)
Convert an int into a byte array. |
static byte[] |
convertToByteArray(long n)
Convert a long into a byte array. |
static byte[] |
convertToByteArray(short n)
Convert a short into a byte array. |
static byte[] |
convertToByteArray(String s)
Convert a string into a byte array. |
static int |
convertToInt(byte[] buf)
Convert a byte array into an integer (signed 32-bit) value. |
static long |
convertToLong(byte[] buf)
Convert a byte array into a long (signed 64-bit) value. |
static String |
convertToString(byte[] buf)
Convert a byte array (encoded as UTF-8) into a String |
static void |
main(String[] args)
Test static methods |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Conversion()
| Method Detail |
|---|
public static byte[] convertToByteArray(String s)
public static byte[] convertToByteArray(byte n)
public static byte[] convertToByteArray(short n)
public static byte[] convertToByteArray(int n)
public static byte[] convertToByteArray(long n)
public static String convertToString(byte[] buf)
public static int convertToInt(byte[] buf)
public static long convertToLong(byte[] buf)
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||