|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.as400.access.BinaryConverter
A binary types converter between Java byte arrays and Java simple types.
| Method Summary | |
|---|---|
static double |
byteArrayToDouble(byte[] serverValue,
int offset)
Convert the specified server data type to a double. |
static float |
byteArrayToFloat(byte[] serverValue,
int offset)
Convert the specified server data type to a float. |
static int |
byteArrayToInt(byte[] serverValue,
int offset)
Convert the specified server data type to an int. |
static long |
byteArrayToLong(byte[] serverValue,
int offset)
Convert the specified server data type to a long. |
static short |
byteArrayToShort(byte[] serverValue,
int offset)
Convert the specified server data type to a short. |
static long |
byteArrayToUnsignedInt(byte[] serverValue,
int offset)
Convert the specified server data type to a long. |
static int |
byteArrayToUnsignedShort(byte[] serverValue,
int offset)
Convert the specified server data type to an int. |
static String |
bytesToString(byte[] b)
Convert the specified byte array to its hexadecimal String representation. |
static String |
bytesToString(byte[] b,
int offset,
int length)
Convert the specified byte array to its hexadecimal String representation. |
static byte[] |
doubleToByteArray(double doubleValue)
Convert the specified double into server format in the specified byte array. |
static void |
doubleToByteArray(double doubleValue,
byte[] serverValue,
int offset)
Convert the specified double into server format in the specified byte array. |
static byte[] |
floatToByteArray(float floatValue)
Convert the specified float into server format in the specified byte array. |
static void |
floatToByteArray(float floatValue,
byte[] serverValue,
int offset)
Convert the specified float into server format in the specified byte array. |
static byte[] |
floatToByteArray(int floatValue)
Deprecated. Use floatToByteArray(float) instead. |
static byte[] |
intToByteArray(int intValue)
Convert the specified int into server format in the specified byte array. |
static void |
intToByteArray(int intValue,
byte[] serverValue,
int offset)
Convert the specified int into server format in the specified byte array. |
static byte[] |
longToByteArray(long longValue)
Convert the specified long into server format in the specified byte array. |
static void |
longToByteArray(long longValue,
byte[] serverValue,
int offset)
Convert the specified long into server format in the specified byte array. |
static byte[] |
shortToByteArray(short shortValue)
Convert the specified short into server format in the specified byte array. |
static void |
shortToByteArray(short shortValue,
byte[] serverValue,
int offset)
Convert the specified short into server format in the specified byte array. |
static byte[] |
stringToBytes(String s)
Convert the specified hexadecimal String into a byte array containing the byte values for the hexadecimal characters in the String. |
static byte[] |
unsignedIntToByteArray(long longValue)
Convert the specified long into server format in the specified byte array. |
static void |
unsignedIntToByteArray(long longValue,
byte[] serverValue,
int offset)
Convert the specified long into server format in the specified byte array. |
static byte[] |
unsignedShortToByteArray(int intValue)
Convert the specified int into server format in the specified byte array. |
static void |
unsignedShortToByteArray(int intValue,
byte[] serverValue,
int offset)
Convert the specified int into server format in the specified byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void shortToByteArray(short shortValue,
byte[] serverValue,
int offset)
shortValue - The value to be converted to server format.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] shortToByteArray(short shortValue)
shortValue - The value to be converted to server format.
public static short byteArrayToShort(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static void intToByteArray(int intValue,
byte[] serverValue,
int offset)
intValue - The value to be converted to server format.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] intToByteArray(int intValue)
intValue - The value to be converted to server format.
public static int byteArrayToInt(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static void floatToByteArray(float floatValue,
byte[] serverValue,
int offset)
floatValue - The value to be converted to server format.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] floatToByteArray(int floatValue)
floatValue - The value to be converted to server format.
public static byte[] floatToByteArray(float floatValue)
floatValue - The value to be converted to server format.
public static float byteArrayToFloat(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static void doubleToByteArray(double doubleValue,
byte[] serverValue,
int offset)
doubleValue - The value to be converted to server format.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] doubleToByteArray(double doubleValue)
doubleValue - The value to be converted to server format.
public static double byteArrayToDouble(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static void unsignedShortToByteArray(int intValue,
byte[] serverValue,
int offset)
intValue - The value to be converted to server format. The integer should be greater than or equal to zero and representable in two bytes.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] unsignedShortToByteArray(int intValue)
intValue - The value to be converted to server format. The integer should be greater than or equal to zero and representable in two bytes.
public static int byteArrayToUnsignedShort(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static void unsignedIntToByteArray(long longValue,
byte[] serverValue,
int offset)
longValue - The value to be converted to server format. The long should be greater than or equal to zero and representable in four bytes.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] unsignedIntToByteArray(long longValue)
longValue - The value to be converted to server format. The long should be greater than or equal to zero and representable in four bytes.
public static long byteArrayToUnsignedInt(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static void longToByteArray(long longValue,
byte[] serverValue,
int offset)
longValue - The value to be converted to server format.serverValue - The array to receive the data type in server format.offset - The offset into the byte array for the start of the server value.public static byte[] longToByteArray(long longValue)
longValue - The value to be converted to server format.
public static long byteArrayToLong(byte[] serverValue,
int offset)
serverValue - The array containing the data type in server format.offset - The offset into the byte array for the start of the server value.
public static final String bytesToString(byte[] b)
b - The array containing the data.
public static final String bytesToString(byte[] b,
int offset,
int length)
b - The array containing the data.offset - The offset into the array at which to begin reading bytes.length - The number of bytes to read out of the array.
public static final byte[] stringToBytes(String s)
s - The String containing the hexadecimal representation of the data.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||