All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.access.BinaryConverter
java.lang.Object
|
+----com.ibm.as400.access.BinaryConverter
- public class BinaryConverter
- extends Object
A binary types converter between Java byte arrays and Java simple types.
-
byteArrayToDouble(byte[], int)
- Convert the specified AS/400 data type to a double.
-
byteArrayToFloat(byte[], int)
- Convert the specified AS/400 data type to a float.
-
byteArrayToInt(byte[], int)
- Convert the specified AS/400 data type to an int.
-
byteArrayToShort(byte[], int)
- Convert the specified AS/400 data type to a short.
-
byteArrayToUnsignedInt(byte[], int)
- Convert the specified AS/400 data type to a long.
-
byteArrayToUnsignedShort(byte[], int)
- Convert the specified AS/400 data type to an int.
-
doubleToByteArray(double, byte[], int)
- Convert the specified double into AS/400 format in the specified byte array.
-
floatToByteArray(float, byte[], int)
- Convert the specified float into AS/400 format in the specified byte array.
-
intToByteArray(int, byte[], int)
- Convert the specified int into AS/400 format in the specified byte array.
-
shortToByteArray(short, byte[], int)
- Convert the specified short into AS/400 format in the specified byte array.
-
unsignedIntToByteArray(long, byte[], int)
- Convert the specified long into AS/400 format in the specified byte array.
-
unsignedShortToByteArray(int, byte[], int)
- Convert the specified int into AS/400 format in the specified byte array.
shortToByteArray
public static void shortToByteArray(short shortValue,
byte as400Value[],
int offset)
- Convert the specified short into AS/400 format in the specified byte array.
- Parameters:
- shortValue - the value to be converted to AS/400 format.
- as400Value - the array to receive the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
byteArrayToShort
public static short byteArrayToShort(byte as400Value[],
int offset)
- Convert the specified AS/400 data type to a short.
- Parameters:
- as400Value - the array containing the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
- Returns:
- a short corresponding to the data type.
intToByteArray
public static void intToByteArray(int intValue,
byte as400Value[],
int offset)
- Convert the specified int into AS/400 format in the specified byte array.
- Parameters:
- intValue - the value to be converted to AS/400 format.
- as400Value - the array to receive the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
byteArrayToInt
public static int byteArrayToInt(byte as400Value[],
int offset)
- Convert the specified AS/400 data type to an int.
- Parameters:
- as400Value - the array containing the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
- Returns:
- an int corresponding to the data type.
floatToByteArray
public static void floatToByteArray(float floatValue,
byte as400Value[],
int offset)
- Convert the specified float into AS/400 format in the specified byte array.
- Parameters:
- floatValue - the value to be converted to AS/400 format.
- as400Value - the array to receive the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
byteArrayToFloat
public static float byteArrayToFloat(byte as400Value[],
int offset)
- Convert the specified AS/400 data type to a float.
- Parameters:
- as400Value - the array containing the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
- Returns:
- a float corresponding to the data type.
doubleToByteArray
public static void doubleToByteArray(double doubleValue,
byte as400Value[],
int offset)
- Convert the specified double into AS/400 format in the specified byte array.
- Parameters:
- doubleValue - the value to be converted to AS/400 format.
- as400Value - the array to receive the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
byteArrayToDouble
public static double byteArrayToDouble(byte as400Value[],
int offset)
- Convert the specified AS/400 data type to a double.
- Parameters:
- as400Value - the array containing the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
- Returns:
- a double corresponding to the data type.
unsignedShortToByteArray
public static void unsignedShortToByteArray(int intValue,
byte as400Value[],
int offset)
- Convert the specified int into AS/400 format in the specified byte array.
- Parameters:
- intValue - the value to be converted to AS/400 format. The integer should be greater than or equal to zero and representable in two bytes.
- as400Value - the array to receive the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
byteArrayToUnsignedShort
public static int byteArrayToUnsignedShort(byte as400Value[],
int offset)
- Convert the specified AS/400 data type to an int.
- Parameters:
- as400Value - the array containing the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
- Returns:
- an int corresponding to the data type.
unsignedIntToByteArray
public static void unsignedIntToByteArray(long longValue,
byte as400Value[],
int offset)
- Convert the specified long into AS/400 format in the specified byte array.
- Parameters:
- longValue - the value to be converted to AS/400 format. The long should be greater than or equal to zero and representable in four bytes.
- as400Value - the array to receive the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
byteArrayToUnsignedInt
public static long byteArrayToUnsignedInt(byte as400Value[],
int offset)
- Convert the specified AS/400 data type to a long.
- Parameters:
- as400Value - the array containing the data type in AS/400 format.
- offset - the offset into the byte array for the start of the AS/400 value.
- Returns:
- a long corresponding to the data type.
All Packages Class Hierarchy This Package Previous Next Index