|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.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 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 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)
Convert the specified float into server format in the specified byte array. |
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[] |
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 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |