| java.lang.Object org.deegree.model.spatialschema.ByteUtils
ByteUtils | public class ByteUtils (Code) | | Utilities for reading and writing the components of binary files.
author: Tom Mitchell version: $Revision: 9343 $ $Date: 2007-12-27 05:30:32 -0800 (Thu, 27 Dec 2007) $ modified version: Last changes:
version: 25.11.1999 ap: memory allocation dynaminized
version: 17.01.2000 ap: method SHPPoint readPoint(byte[] b, int off) modified
version: 17.01.2000 ap: method SHPEnvelope readBox(byte[] b, int off) modified
version: 17.01.2000 ap: method writePoint(..) modified
version: 25.01.2000 ap: method writeBELong(..) added
version: 25.01.2000 ap: method writeBEDouble(..) added
version: 25.01.2000 ap: method readBELong(..) added
version: 25.01.2000 ap: method readBEDouble(..) added
version: 22.04.2000 ap: method readBEShort(byte[] b, int off) added
version: 22.04.2000 ap: method readLEShort(byte[] b, int off) added
version: 22.04.2000 ap: method writeBEShort(byte[] b, int off) added
version: 22.04.2000 ap: method writeLEShort(byte[] b, int off) added
version: version: ---------------------------------------------------------------------------- version:
author: Andreas Poth version: $Revision: 9343 $ $Date: 2007-12-27 05:30:32 -0800 (Thu, 27 Dec 2007) $ version: |
Method Summary | |
public static double | readBEDouble(byte[] b, int off) method: readBEDouble(byte[] b, int off)
Reads a big endian double. | public static float | readBEFloat(byte[] b, int off) Reads a big endian float. | public static int | readBEInt(byte[] b, int off) Reads a big endian integer. | public static long | readBELong(byte[] b, int off) method: readBELong(byte[] b, int off)
Reads a little endian 8 byte integer. | public static int | readBEShort(byte[] b, int off) method: readBEShort(byte[] b, int off)
Reads a big endian small integer. | public static double | readLEDouble(byte[] b, int off) method: readLEDouble(byte[] b, int off)
Reads a little endian double. | public static float | readLEFloat(byte[] b, int off) Reads a little endian float. | public static int | readLEInt(byte[] b, int off) Reads a little endian integer. | public static long | readLELong(byte[] b, int off) method: readLELong(byte[] b, int off)
Reads a little endian 8 byte integer. | public static int | readLEShort(byte[] b, int off) method: readLEShort(byte[] b, int off)
Reads a little endian small integer. | public static int | writeBEDouble(byte[] b, int off, double val) method: writeBEDouble(byte[] b, int off, double val)
Writes the given double to the given buffer at the given location in big endian format. | public static int | writeBEInt(byte[] b, int off, int val) method: writeBEInt(byte[] b, int off, int val)
Writes the given integer to the given buffer at the given location in big endian format. | public static int | writeBELong(byte[] b, int off, long val) method: writeBELong(byte[] b, int off, long val)
Writes the given long to the given buffer at the given location in big endian format. | public static int | writeBEShort(byte[] b, int off, int val) method: writeBEShort(byte[] b, int off, int val)
Writes the given short to the given buffer at the given location in big endian format. | public static int | writeLEDouble(byte[] b, int off, double val) method: writeLEDouble(byte[] b, int off, double val)
Writes the given double to the given buffer at the given location in little endian format. | public static int | writeLEInt(byte[] b, int off, int val) method: writeLEInt(byte[] b, int off, int val)
Writes the given integer to the given buffer at the given location in little endian format. | public static int | writeLELong(byte[] b, int off, long val) method: writeLELong(byte[] b, int off, long val)
Writes the given long to the given buffer at the given location in little endian format. | public static int | writeLEShort(byte[] b, int off, int val) method: writeLEShort(byte[] b, int off, int val)
Writes the given short to the given buffer at the given location in big endian format. |
readBEDouble | public static double readBEDouble(byte[] b, int off)(Code) | | method: readBEDouble(byte[] b, int off)
Reads a big endian double.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the double resides the double read from the buffer at the offset location |
readBEFloat | public static float readBEFloat(byte[] b, int off)(Code) | | Reads a big endian float.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the float resides the float read from the buffer at the offset location |
readBEInt | public static int readBEInt(byte[] b, int off)(Code) | | Reads a big endian integer.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the int resides the int read from the buffer at the offset location |
readBELong | public static long readBELong(byte[] b, int off)(Code) | | method: readBELong(byte[] b, int off)
Reads a little endian 8 byte integer.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the long resides the long read from the buffer at the offset location |
readBEShort | public static int readBEShort(byte[] b, int off)(Code) | | method: readBEShort(byte[] b, int off)
Reads a big endian small integer.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the int resides the int read from the buffer at the offset locationnot tested! |
readLEDouble | public static double readLEDouble(byte[] b, int off)(Code) | | method: readLEDouble(byte[] b, int off)
Reads a little endian double.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the double resides the double read from the buffer at the offset location |
readLEFloat | public static float readLEFloat(byte[] b, int off)(Code) | | Reads a little endian float.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the float resides the float read from the buffer at the offset location |
readLEInt | public static int readLEInt(byte[] b, int off)(Code) | | Reads a little endian integer.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the int resides the int read from the buffer at the offset location |
readLELong | public static long readLELong(byte[] b, int off)(Code) | | method: readLELong(byte[] b, int off)
Reads a little endian 8 byte integer.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the long resides the long read from the buffer at the offset location |
readLEShort | public static int readLEShort(byte[] b, int off)(Code) | | method: readLEShort(byte[] b, int off)
Reads a little endian small integer.
Parameters: b - the raw data buffer Parameters: off - the offset into the buffer where the int resides the int read from the buffer at the offset locationnot tested! |
writeBEDouble | public static int writeBEDouble(byte[] b, int off, double val)(Code) | | method: writeBEDouble(byte[] b, int off, double val)
Writes the given double to the given buffer at the given location in big endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the double to write the number of bytes written |
writeBEInt | public static int writeBEInt(byte[] b, int off, int val)(Code) | | method: writeBEInt(byte[] b, int off, int val)
Writes the given integer to the given buffer at the given location in big endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the integer to write the number of bytes written |
writeBELong | public static int writeBELong(byte[] b, int off, long val)(Code) | | method: writeBELong(byte[] b, int off, long val)
Writes the given long to the given buffer at the given location in big endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the long to write the number of bytes written |
writeBEShort | public static int writeBEShort(byte[] b, int off, int val)(Code) | | method: writeBEShort(byte[] b, int off, int val)
Writes the given short to the given buffer at the given location in big endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the short to write the number of bytes writtennot tested! |
writeLEDouble | public static int writeLEDouble(byte[] b, int off, double val)(Code) | | method: writeLEDouble(byte[] b, int off, double val)
Writes the given double to the given buffer at the given location in little endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the double to write the number of bytes written |
writeLEInt | public static int writeLEInt(byte[] b, int off, int val)(Code) | | method: writeLEInt(byte[] b, int off, int val)
Writes the given integer to the given buffer at the given location in little endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the integer to write the number of bytes written |
writeLELong | public static int writeLELong(byte[] b, int off, long val)(Code) | | method: writeLELong(byte[] b, int off, long val)
Writes the given long to the given buffer at the given location in little endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the long to write the number of bytes written |
writeLEShort | public static int writeLEShort(byte[] b, int off, int val)(Code) | | method: writeLEShort(byte[] b, int off, int val)
Writes the given short to the given buffer at the given location in big endian format.
Parameters: b - the data buffer Parameters: off - the offset into the buffer where writing should occur Parameters: val - the short to write the number of bytes writtennot tested! |
|
|