public class DynamicByteArray extends DynamicArray
Since this class is often used to read and write strange binary formats, a
plethora of very specific read and write methods are provided in addition to
the usual DynamicArray homework. We have done our best to ensure high
performance.
Since all DynamicArrays track which items actually hold content,
this can be a very useful way to manage binary data in memory; you can use a
DynamicByteArray somewhat like a file, for example. Care should be
exercised, however, lest this turn into the universal hammer for all I/O
purposes. There are more appropriate tools for some uses in java.io and
java.nio.
There are several distinct method name patterns in this class.
Methods like "readFoo" are designed to read some number of bytes in the specified "Foo" format and return the result. If the read method takes a position argument, it does not change the start and end markers. If it does not take an argument, then it uses the start marker AND moves the start marker to reflect that the bytes have been read and therefore "used up".
Similarly, methods like "writeFoo" are designed to convert the argument from the specified "Foo" format into bytes. If the write method takes a position argument, it overwrites existing data in the array. If not, it appends the bytes to the end of the array and increments the end variable appropriately.
The format descriptions are a bit cryptic. They generally combine endianness with byte size and type. For example, Int32 is a standard (for Java) 32-bit big-endian signed integer, taking up four bytes. Int32LE is a little-endian integer of the same size. UInt8 is an unsigned, single-byte integer (0-255). Etc. Hopefully these will remove some of the pain of reading strange file formats.
Read and write methods for the common, Java primitive types are included as
well, and work the same as they do in DataInput and
DataOutput. While they are in many ways redundant, they are
nicely idiomatic for Java-centric data storage.
Copyright 2001-2007 Partner Software, Inc.
| Modifier and Type | Field and Description |
|---|---|
byte[] |
array |
arrayObject, capacity, end, fastGrowthFactor, fastGrowthLimit, slowGrowthAmount, start| Constructor and Description |
|---|
DynamicByteArray()
Creates an empty byte array with zero capacity.
|
DynamicByteArray(byte... array)
Creates a DynamicByteArray with the given internal array.
|
DynamicByteArray(int capacity)
Creates an empty byte array of the given initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte... bytes)
Appends a copy of the contents of the given array to this one.
|
long |
checksum()
Returns a CRC32 checksum of the contents.
|
boolean |
equals(java.lang.Object nother) |
void |
fillWith(int value)
Fills the array with the given value.
|
void |
fillWith(int value,
int from,
int to)
Fills the array with the given value.
|
int |
hashCode() |
int |
indexOf(byte... matchThis)
Searches the contents for a match on the given binary array.
|
void |
inputFromData(java.io.DataInput innie,
int howMuch)
Fills this DynamicByteArray with data from the given
DataInput, appending it to the end of any existing data. |
void |
inputFromStream(java.io.InputStream innie,
int howMuch)
Fills this DynamicByteArray with data from the given stream, appending it
to the end of any existing data.
|
void |
newArray(int size)
Allocates a new, empty array of the given size and assign it to the
arrayObject property.
|
void |
outputToData(java.io.DataOutput outie)
Writes the entire contents to a
DataOutput. |
void |
outputToData(java.io.DataOutput outie,
int startPos,
int endPos)
Writes partial contents to a
DataOutput. |
void |
outputToStream(java.io.OutputStream outie)
Writes the entire contents to a
OutputStream. |
void |
outputToStream(java.io.OutputStream outie,
int startPos,
int endPos)
Writes partial contents to a
OutputStream. |
java.lang.String |
readAscii(int byteSize) |
java.lang.String |
readAscii(int byteSize,
int whereAt) |
boolean |
readBoolean()
Reads a single boolean from the start position.
|
boolean |
readBoolean(int whereAt)
Reads a single boolean from the given position.
|
byte |
readByte()
Read a single 8-bit byte from the current start position.
|
byte |
readByte(int whereAt)
Read a single 8-bit byte from the given position.
|
char |
readChar()
Reads a single two-byte char from the start position.
|
char |
readChar(int whereAt)
Reads a single two-byte char from the given position.
|
double |
readDouble()
Reads a 64-bit floating-point value
from 8 bytes using big-endian order.
|
double |
readDouble(int whereAt)
Reads a 64-bit floating-point value
from 8 bytes using big-endian order.
|
float |
readFloat()
Reads a 32-bit floating-point value
from 4 bytes using big-endian order.
|
float |
readFloat(int whereAt)
Reads a 32-bit floating-point value
from 4 bytes using big-endian order.
|
float |
readFloat32()
Reads a 32-bit floating-point value
from 4 bytes using big-endian order.
|
float |
readFloat32(int whereAt)
Reads a 32-bit floating-point value
from 4 bytes using big-endian order.
|
float |
readFloat32LE()
Reads a 32-bit floating-point value
from 4 bytes using little-endian order.
|
float |
readFloat32LE(int whereAt)
Reads a 32-bit floating-point value
from 4 bytes using little-endian order.
|
double |
readFloat64()
Reads a 64-bit floating-point value
from 8 bytes using big-endian order.
|
double |
readFloat64(int whereAt)
Reads a 64-bit floating-point value
from 8 bytes using big-endian order.
|
double |
readFloat64LE()
Reads a 64-bit floating-point value
from 8 bytes using little-endian order.
|
double |
readFloat64LE(int whereAt)
Reads a 64-bit floating-point value
from 8 bytes using little-endian order.
|
int |
readInt()
Reads a signed 32-bit integer value
from 4 bytes in big-endian order.
|
int |
readInt(int whereAt)
Reads a signed 32-bit integer value
from 4 bytes in big-endian order.
|
short |
readInt16()
Reads a signed 16-bit integer value
from 2 bytes in big-endian order.
|
short |
readInt16(int whereAt)
Reads a signed 16-bit integer value
from 2 bytes in big-endian order.
|
short |
readInt16LE()
Reads a signed 16-bit integer value
from 2 bytes in little-endian order.
|
short |
readInt16LE(int whereAt)
Reads a signed 16-bit integer value
from 2 bytes in little-endian order.
|
int |
readInt32()
Reads a signed 32-bit integer value
from 4 bytes in big-endian order.
|
int |
readInt32(int whereAt)
Reads a signed 32-bit integer value
from 4 bytes in big-endian order.
|
int |
readInt32LE()
Reads a signed 32-bit integer value
from 4 bytes in little-endian order.
|
int |
readInt32LE(int whereAt)
Reads a signed 32-bit integer value
from 4 bytes in little-endian order.
|
long |
readInt64()
Reads a signed 64-bit integer value
from 8 bytes in big-endian order.
|
long |
readInt64(int whereAt)
Reads a signed 64-bit integer value
from 8 bytes in big-endian order.
|
long |
readInt64LE()
Reads a signed 64-bit integer value
from 8 bytes in little-endian order.
|
long |
readInt64LE(int whereAt)
Reads a signed 64-bit integer value
from 8 bytes in little-endian order.
|
byte |
readInt8()
Read a single 8-bit byte from the current start position.
|
byte |
readInt8(int whereAt)
Read a single 8-bit byte from the given position.
|
long |
readLong()
Reads a signed 64-bit integer value
from 8 bytes in big-endian order.
|
long |
readLong(int whereAt)
Reads a signed 64-bit integer value
from 8 bytes in big-endian order.
|
short |
readShort()
Reads a signed 16-bit integer value
from 2 bytes in big-endian order.
|
short |
readShort(int whereAt)
Reads a signed 16-bit integer value
from 2 bytes in big-endian order.
|
int |
readUInt16()
Reads a unsigned 16-bit integer value
from 2 bytes in big-endian order.
|
int |
readUInt16(int whereAt)
Reads a unsigned 16-bit integer value
from 2 bytes in big-endian order.
|
int |
readUInt16LE()
Reads a unsigned 16-bit integer value
from 2 bytes in little-endian order.
|
int |
readUInt16LE(int whereAt)
Reads a unsigned 16-bit integer value
from 2 bytes in little-endian order.
|
long |
readUInt32()
Reads a unsigned 32-bit integer value
from 4 bytes in big-endian order.
|
long |
readUInt32(int whereAt)
Reads a unsigned 32-bit integer value
from 4 bytes in big-endian order.
|
long |
readUInt32LE()
Reads a unsigned 32-bit integer value
from 4 bytes in little-endian order.
|
long |
readUInt32LE(int whereAt)
Reads a unsigned 32-bit integer value
from 4 bytes in little-endian order.
|
int |
readUInt8()
Read a single unsigned 8-bit byte from the current start position.
|
int |
readUInt8(int whereAt)
Read a single 8-bit byte from the given position.
|
java.lang.String |
readUTF()
Reads a string in modified UTF format as used by
DataInput and DataOutput. |
long |
readVariableLengthQuantity()
Reads a variable-length unsigned integer using the high bit for each sequential byte as the
extension bit.
|
java.lang.String |
toBinaryString()
Returns a String representation, in binary notation, of the entire
contents.
|
java.lang.String |
toBinaryString(int startPos,
int endPos)
Returns a String representation, in binary notation, of the contents.
|
java.lang.String |
toBinaryString(int startPos,
int endPos,
int groupSize,
int lineSize)
Returns a String representation, in binary notation, of the contents.
|
byte[] |
toByteArray()
Returns a fresh, independent copy of the contents as a byte array.
|
java.lang.String |
toHexString()
Returns a String representation, in hexadecimal notation, of the entire
contents.
|
java.lang.String |
toHexString(int startPos,
int endPos)
Returns a String representation, in hexadecimal notation, of the
contents.
|
java.lang.String |
toHexString(int startPos,
int endPos,
int groupSize,
int lineSize)
Returns a String representation, in hexadecimal notation, of the
contents.
|
void |
writeAscii(java.lang.String value,
int byteSize)
Appends a fixed-width String in US-ASCII format, with no terminating null
character.
|
void |
writeAscii(java.lang.String value,
int byteSize,
int whereAt)
Writes a fixed-width String in US-ASCII format at the given position,
with no terminating null character.
|
void |
writeBoolean(boolean what)
Writes a single boolean to the current end position.
|
void |
writeBoolean(boolean what,
int whereAt)
Writes a single boolean to the given position.
|
void |
writeByte(byte what)
Writes a single 8-bit byte to the current end position.
|
void |
writeByte(byte what,
int whereAt)
Writes a single 8-bit byte to the given position.
|
void |
writeBytes(byte[] bytes,
int whereAt)
Writes the given bytes to the given position.
|
void |
writeChar(char what)
Writes a single char to the current end position.
|
void |
writeChar(char what,
int whereAt)
Writes a single two-byte char to the given position.
|
void |
writeDouble(double what)
Writes a 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeDouble(double what,
int whereAt)
Writes a 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeFloat(float what)
Writes a 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeFloat(float what,
int whereAt)
Writes a 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeFloat32(float what)
Writes a 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeFloat32(float what,
int whereAt)
Writes a 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeFloat32LE(float what)
Writes a 32-bit integer value
into 4 bytes using little-endian order.
|
void |
writeFloat32LE(float what,
int whereAt)
Writes a 32-bit integer value
into 4 bytes using little-endian order.
|
void |
writeFloat64(double what)
Writes a 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeFloat64(double what,
int whereAt)
Writes a 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeFloat64LE(double what)
Writes a 64-bit integer value
into 8 bytes using little-endian order.
|
void |
writeFloat64LE(double what,
int whereAt)
Writes a 64-bit integer value
into 8 bytes using little-endian order.
|
void |
writeHexStringAsBytes(java.lang.String hex)
Parses the hexadecimal notation and writes the resulting bytes to the position given.
|
void |
writeHexStringAsBytes(java.lang.String hex,
int whereAt)
Parses the hexadecimal notation and appends the resulting bytes on the
end of the array.
|
void |
writeInt(int what)
Writes a signed 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeInt(int what,
int whereAt)
Writes a signed 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeInt16(short what)
Writes a signed 16-bit integer value
into 2 bytes using big-endian order.
|
void |
writeInt16(short what,
int whereAt)
Writes a signed 16-bit integer value
into 2 bytes using big-endian order.
|
void |
writeInt16LE(short what)
Writes a signed 16-bit integer value
into 2 bytes using little-endian order.
|
void |
writeInt16LE(short what,
int whereAt)
Writes a signed 16-bit integer value
into 2 bytes using little-endian order.
|
void |
writeInt32(int what)
Writes a signed 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeInt32(int what,
int whereAt)
Writes a signed 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeInt32LE(int what)
Writes a signed 32-bit integer value
into 4 bytes using little-endian order.
|
void |
writeInt32LE(int what,
int whereAt)
Writes a signed 32-bit integer value
into 4 bytes using little-endian order.
|
void |
writeInt64(long what)
Writes a signed 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeInt64(long what,
int whereAt)
Writes a signed 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeInt64LE(long what)
Writes a signed 64-bit integer value
into 8 bytes using little-endian order.
|
void |
writeInt64LE(long what,
int whereAt)
Writes a signed 64-bit integer value
into 8 bytes using little-endian order.
|
void |
writeInt8(byte what)
Writes a single 8-bit byte to the current end position.
|
void |
writeInt8(byte what,
int whereAt)
Writes a single 8-bit byte to the given position.
|
void |
writeLong(long what)
Writes a signed 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeLong(long what,
int whereAt)
Writes a signed 64-bit integer value
into 8 bytes using big-endian order.
|
void |
writeShort(short what)
Writes a signed 16-bit integer value
into 2 bytes using big-endian order.
|
void |
writeShort(short what,
int whereAt)
Writes a signed 16-bit integer value
into 2 bytes using big-endian order.
|
void |
writeUInt16(int what)
Writes a unsigned 16-bit integer value
into 2 bytes using big-endian order.
|
void |
writeUInt16(int what,
int whereAt)
Writes a unsigned 16-bit integer value
into 2 bytes using big-endian order.
|
void |
writeUInt16LE(int what)
Writes a unsigned 16-bit integer value
into 2 bytes using little-endian order.
|
void |
writeUInt16LE(int what,
int whereAt)
Writes a unsigned 16-bit integer value
into 2 bytes using little-endian order.
|
void |
writeUInt32(long what)
Writes a unsigned 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeUInt32(long what,
int whereAt)
Writes a unsigned 32-bit integer value
into 4 bytes using big-endian order.
|
void |
writeUInt32LE(long what)
Writes a unsigned 32-bit integer value
into 4 bytes using little-endian order.
|
void |
writeUInt32LE(long what,
int whereAt)
Writes a unsigned 32-bit integer value
into 4 bytes using little-endian order.
|
void |
writeUInt8(int what)
Writes a single unsigned 8-bit byte to the current end position.
|
void |
writeUInt8(int what,
int whereAt)
Writes a single 8-bit byte to the given position.
|
void |
writeUTF(java.lang.String value)
Writes a string in modified UTF format as used by
DataInput and DataOutput. |
int |
writeVariableLengthQuantity(long value)
Writes a variable-length unsigned integer using the high bit for each sequential byte as the
extension bit.
|
void |
zero()
Zeros the entire array.
|
append, clear, copy, copy, copyExactly, copyFrom, copyTo, insert, isEmpty, makeRoomFor, makeRoomFor, pack, remove, size, subsection, tidy, toStringpublic DynamicByteArray()
public DynamicByteArray(int capacity)
capacity - initial capacitypublic DynamicByteArray(byte... array)
array variable, note that this
internal array will be discarded if the DynamicByteArray is resized!
However, this can be a very useful constructor if you are using the
DynamicByteArray for reading in weird binary data that you have loaded in
some other fashion, and don't want the additional expense of copying the
array.
Start is set to 0 and end is set to array.length. Change them after constructing if you don't like those values.
Note that this also works as varargs... if for some reason you like typing in hex bytes in your constructor.
array - source array for this DynamicByteArray; it is used, not copiedpublic final void newArray(int size)
DynamicArray
public abstract void newArray(int size) {
arrayObject = array = new Foo[size];
}
newArray in class DynamicArraypublic final void append(byte... bytes)
DynamicArray.end variable by notherArray.length.bytes - array to append frompublic final byte[] toByteArray()
public final long checksum()
public int indexOf(byte... matchThis)
matchThis - byte sequence to search forpublic void zero()
public void fillWith(int value)
public void fillWith(int value,
int from,
int to)
public void writeBytes(byte[] bytes,
int whereAt)
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic final void writeHexStringAsBytes(java.lang.String hex)
hex - input hexadecimalpublic final void writeHexStringAsBytes(java.lang.String hex,
int whereAt)
hex - input hexadecimalpublic final java.lang.String toHexString()
toHexString(int, int, int, int) with default
values of startPos=start, endPos=end, groupSize=2 and lineSize=16.public final java.lang.String toHexString(int startPos,
int endPos)
toHexString(int, int, int, int) with default
values of groupSize=2 and lineSize=16.startPos - where to start, inclusiveendPos - where to end, exclusivepublic final java.lang.String toHexString(int startPos,
int endPos,
int groupSize,
int lineSize)
startPos - where to start, inclusiveendPos - where to end, exclusivegroupSize - how many bytes in a grouplineSize - how many bytes in a linepublic final java.lang.String toBinaryString()
toBinaryString(int, int, int, int) with
default values of startPos=start, endPos=end, groupSize=2 and
lineSize=16.public final java.lang.String toBinaryString(int startPos,
int endPos)
toBinaryString(int, int, int, int) with default values
of groupSize=2 and lineSize=16.startPos - where to start, inclusiveendPos - where to end, exclusivepublic final java.lang.String toBinaryString(int startPos,
int endPos,
int groupSize,
int lineSize)
startPos - where to start, inclusiveendPos - where to end, exclusivegroupSize - how many bytes in a grouplineSize - how many bytes in a linepublic void inputFromStream(java.io.InputStream innie,
int howMuch)
throws java.io.IOException
innie - input to read input fromhowMuch - how many bytes to readjava.io.IOException - if anything bad happenspublic void inputFromData(java.io.DataInput innie,
int howMuch)
throws java.io.IOException
DataInput, appending it to the end of any existing data.innie - input to read input fromhowMuch - how many bytes to readjava.io.IOException - if anything bad happenspublic void outputToStream(java.io.OutputStream outie)
throws java.io.IOException
OutputStream.outie - output to output tojava.io.IOException - if something bad happenspublic void outputToStream(java.io.OutputStream outie,
int startPos,
int endPos)
throws java.io.IOException
OutputStream.outie - output to output tostartPos - starting position (inclusive)endPos - ending position (exclusive)java.io.IOException - if something bad happenspublic void outputToData(java.io.DataOutput outie)
throws java.io.IOException
DataOutput.outie - output to output tojava.io.IOException - if something bad happenspublic void outputToData(java.io.DataOutput outie,
int startPos,
int endPos)
throws java.io.IOException
DataOutput.outie - output to output tostartPos - starting position (inclusive)endPos - ending position (exclusive)java.io.IOException - if something bad happenspublic java.lang.String readUTF()
DataInput and DataOutput.public void writeUTF(java.lang.String value)
DataInput and DataOutput.value - String to be writtenpublic void writeAscii(java.lang.String value,
int byteSize)
public void writeAscii(java.lang.String value,
int byteSize,
int whereAt)
public java.lang.String readAscii(int byteSize)
public java.lang.String readAscii(int byteSize,
int whereAt)
public long readVariableLengthQuantity()
See http://en.wikipedia.org/wiki/Variable_length_unsigned_integer for the format description.
public int writeVariableLengthQuantity(long value)
Returns the number of bytes used.
See http://en.wikipedia.org/wiki/Variable_length_unsigned_integer for the format description.
public byte readByte()
public void writeByte(byte what)
what - 8-bit integer value to writepublic byte readByte(int whereAt)
whereAt - position to read byte frompublic void writeByte(byte what,
int whereAt)
whereAt - position to write byte towhat - 8-bit integer value to writepublic byte readInt8()
public void writeInt8(byte what)
what - 8-bit integer value to writepublic byte readInt8(int whereAt)
whereAt - position to read byte frompublic void writeInt8(byte what,
int whereAt)
whereAt - position to write byte towhat - 8-bit integer value to writepublic int readUInt8()
public void writeUInt8(int what)
what - 8-bit integer value to writepublic int readUInt8(int whereAt)
whereAt - position to read byte frompublic void writeUInt8(int what,
int whereAt)
whereAt - position to write byte towhat - 8-bit integer value to writepublic final boolean readBoolean(int whereAt)
whereAt - position to read boolean frompublic final boolean readBoolean()
public final void writeBoolean(boolean what,
int whereAt)
what - boolean value to writewhereAt - position to write boolean topublic final void writeBoolean(boolean what)
what - boolean value to writepublic final char readChar(int whereAt)
whereAt - position to read char frompublic final char readChar()
public final void writeChar(char what,
int whereAt)
what - char value to writewhereAt - position to write char topublic final void writeChar(char what)
what - char value to writepublic short readShort()
public void writeShort(short what)
what - 16-bit integer value to writepublic short readShort(int whereAt)
whereAt - position to start readingpublic void writeShort(short what,
int whereAt)
whereAt - position to start writingwhat - 16-bit integer value to writepublic int readInt()
public void writeInt(int what)
what - 32-bit integer value to writepublic int readInt(int whereAt)
whereAt - position to start readingpublic void writeInt(int what,
int whereAt)
whereAt - position to start writingwhat - 32-bit integer value to writepublic long readLong()
public void writeLong(long what)
what - 64-bit integer value to writepublic long readLong(int whereAt)
whereAt - position to start readingpublic void writeLong(long what,
int whereAt)
whereAt - position to start writingwhat - 64-bit integer value to writepublic float readFloat()
public void writeFloat(float what)
what - 32-bit integer value to writepublic float readFloat(int whereAt)
whereAt - position to start readingpublic void writeFloat(float what,
int whereAt)
whereAt - position to start readingwhat - 32-bit integer value to writepublic double readDouble()
public void writeDouble(double what)
what - 64-bit integer value to writepublic double readDouble(int whereAt)
whereAt - position to start readingpublic void writeDouble(double what,
int whereAt)
whereAt - position to start readingwhat - 64-bit integer value to writepublic short readInt16()
public void writeInt16(short what)
what - 16-bit integer value to writepublic short readInt16(int whereAt)
whereAt - position to start readingpublic void writeInt16(short what,
int whereAt)
whereAt - position to start writingwhat - 16-bit integer value to writepublic int readUInt16()
public void writeUInt16(int what)
what - 16-bit integer value to writepublic int readUInt16(int whereAt)
whereAt - position to start readingpublic void writeUInt16(int what,
int whereAt)
whereAt - position to start writingwhat - 16-bit integer value to writepublic short readInt16LE()
public void writeInt16LE(short what)
what - 16-bit integer value to writepublic short readInt16LE(int whereAt)
whereAt - position to start readingpublic void writeInt16LE(short what,
int whereAt)
whereAt - position to start writingwhat - 16-bit integer value to writepublic int readUInt16LE()
public void writeUInt16LE(int what)
what - 16-bit integer value to writepublic int readUInt16LE(int whereAt)
whereAt - position to start readingpublic void writeUInt16LE(int what,
int whereAt)
whereAt - position to start writingwhat - 16-bit integer value to writepublic int readInt32()
public void writeInt32(int what)
what - 32-bit integer value to writepublic int readInt32(int whereAt)
whereAt - position to start readingpublic void writeInt32(int what,
int whereAt)
whereAt - position to start writingwhat - 32-bit integer value to writepublic long readUInt32()
public void writeUInt32(long what)
what - 32-bit integer value to writepublic long readUInt32(int whereAt)
whereAt - position to start readingpublic void writeUInt32(long what,
int whereAt)
whereAt - position to start writingwhat - 32-bit integer value to writepublic int readInt32LE()
public void writeInt32LE(int what)
what - 32-bit integer value to writepublic int readInt32LE(int whereAt)
whereAt - position to start readingpublic void writeInt32LE(int what,
int whereAt)
whereAt - position to start writingwhat - 32-bit integer value to writepublic long readUInt32LE()
public void writeUInt32LE(long what)
what - 32-bit integer value to writepublic long readUInt32LE(int whereAt)
whereAt - position to start readingpublic void writeUInt32LE(long what,
int whereAt)
whereAt - position to start writingwhat - 32-bit integer value to writepublic long readInt64()
public void writeInt64(long what)
what - 64-bit integer value to writepublic long readInt64(int whereAt)
whereAt - position to start readingpublic void writeInt64(long what,
int whereAt)
whereAt - position to start writingwhat - 64-bit integer value to writepublic long readInt64LE()
public void writeInt64LE(long what)
what - 64-bit integer value to writepublic long readInt64LE(int whereAt)
whereAt - position to start readingpublic void writeInt64LE(long what,
int whereAt)
whereAt - position to start writingwhat - 64-bit integer value to writepublic float readFloat32()
public void writeFloat32(float what)
what - 32-bit integer value to writepublic float readFloat32(int whereAt)
whereAt - position to start readingpublic void writeFloat32(float what,
int whereAt)
whereAt - position to start readingwhat - 32-bit integer value to writepublic float readFloat32LE()
public void writeFloat32LE(float what)
what - 32-bit integer value to writepublic float readFloat32LE(int whereAt)
whereAt - position to start readingpublic void writeFloat32LE(float what,
int whereAt)
whereAt - position to start readingwhat - 32-bit integer value to writepublic double readFloat64()
public void writeFloat64(double what)
what - 64-bit integer value to writepublic double readFloat64(int whereAt)
whereAt - position to start readingpublic void writeFloat64(double what,
int whereAt)
whereAt - position to start readingwhat - 64-bit integer value to writepublic double readFloat64LE()
public void writeFloat64LE(double what)
what - 64-bit integer value to writepublic double readFloat64LE(int whereAt)
whereAt - position to start readingpublic void writeFloat64LE(double what,
int whereAt)
whereAt - position to start readingwhat - 64-bit integer value to write