LibreOffice Module xmerge (master) 1
|
Helper class providing static methods to convert data to/from Network Byte Order (Big Endian). More...
Static Public Member Functions | |
static byte[] | writeShort (short value) |
Convert a short to a Little Endian representation. More... | |
static byte[] | writeInt (int value) |
Convert an integer to a Little Endian representation. More... | |
static byte[] | writeDouble (double value) |
Converts a double to a Little Endian representation of a float in IEEE-754 format. More... | |
static short | readShort (byte[] value) |
Convert a Little Endian representation of a short to a Java short (Network Byte Order). More... | |
static int | readInt (byte[] value) |
Convert a Little Endian representation of an integer to a Java int (Network Byte Order). More... | |
static double | readDouble (byte[] value) |
Convert a Little Endian representation of a float in IEEE-754 Little Endian to a Java double (Network Byte Order). More... | |
Helper class providing static methods to convert data to/from Network Byte Order (Big Endian).
With the introduction of java.nio.ByteOrder
and java.nio.ByteBuffer
in Java 1.4, it may no longer be necessary to use this class in the future.
Definition at line 34 of file EndianConverter.java.
|
inlinestatic |
Convert a Little Endian representation of a float in IEEE-754 Little Endian to a Java double
(Network Byte Order).
An array with more than eight elements can be used, but only the first eight elements will be read.
value | byte array containing the LE representation of an IEEE-754 float. |
double
containing the converted value. Definition at line 123 of file EndianConverter.java.
Convert a Little Endian representation of an integer to a Java int
(Network Byte Order).
An array with more than four elements can be used, but only the first four elements will be read.
value | byte array containing the LE representation of the value. |
int
containing the converted value. Definition at line 106 of file EndianConverter.java.
References value.
|
inlinestatic |
Convert a Little Endian representation of a short to a Java short
(Network Byte Order).
An array with more than two elements can be used, but only the first two elements will be read.
value | byte array containing the LE representation of the value. |
short
containing the converted value. Definition at line 89 of file EndianConverter.java.
References value.
|
inlinestatic |
Converts a double
to a Little Endian representation of a float in IEEE-754 format.
An array with more than eight elements can be used, but only the first eight elements will be read.
value | double containing the value to be converted. |
byte
array containing the LE representation of a IEEE-754 float. Definition at line 72 of file EndianConverter.java.
Convert an integer to a Little Endian representation.
value | The int to be converted. |
byte
array containing the converted value. Definition at line 55 of file EndianConverter.java.
References value.
|
inlinestatic |
Convert a short
to a Little Endian representation.
value | The short to be converted. |
byte
array containing the converted value. Definition at line 43 of file EndianConverter.java.
References value.