This is the sister class of the DataInputStream which allows for reading of java native datatypes from an input stream with the datatypes stored in big endian byte order.
This class implements the minimum required and calls DataInputStream for some of the required methods for DataInput.
Not all methods are implemented due to lack of immediatte requirement for that functionality. It is not clear if it is ever going to be functionally required to be able to read UTF data in a LittleEndianManner
| Modifier and Type | Field and Description |
|---|---|
| pack-priv DataInputStream | dataIn
To reuse some of the non endian dependent methods from DataInputStreams methods. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public final synchronized int | read(final byte[]
the buffer into which the data is read. b)Overrides java. b.length bytes of data from this
input stream into an array of bytes.
|
| public final synchronized int | read(final byte[]
the buffer into which the data is read. b, final int the start offset in array off, final int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. len bytes of data from this input stream
into an array of bytes.
|
| public final boolean | readBoolean()
Implements java. true if that byte is nonzero,
false if that byte is zero.
|
| public final byte | |
| public final char | |
| public final double | readDouble()
Implements java. double value.
|
| public final float | readFloat()
Implements java. float value.
|
| public final void | readFully(final byte[]
the buffer into which the data is read. b)Implements java. b.
|
| public final void | readFully(final byte[]
the buffer into which the data is read. b, final int an int specifying the offset in the data array off, final int b.an int specifying the number of bytes to read. len)Implements java. len
bytes from
an input stream.
|
| public final int | |
| public final String | Returns: empty new stringImplements java. |
| public final long | |
| public final short | |
| public final int | readUnsignedByte()
Implements java. int, and returns
the result, which is therefore in the range
0
through 255.
|
| public final int | readUnsignedShort()
Implements java. int value in the range 0
through 65535.
|
| public final String | Returns: empty new stringImplements java. |
| public static final String | |
| public final int | skipBytes(final int
the number of bytes to be skipped. n)Implements java. n bytes
of data from the input
stream, discarding the skipped bytes.
|
| dataIn | back to summary |
|---|---|
| pack-priv DataInputStream dataIn To reuse some of the non endian dependent methods from DataInputStreams methods. | |
| LEDataInputStream | back to summary |
|---|---|
| public LEDataInputStream(final InputStream in) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| read | back to summary |
|---|---|
| public final synchronized int read(final byte[] b) throws IOException Overrides java. Doc from java. Reads up to
| |
| read | back to summary |
|---|---|
| public final synchronized int read(final byte[] b, final int off, final int len) throws IOException Overrides java. Doc from java. Reads up to
| |
| readBoolean | back to summary |
|---|---|
| public final boolean readBoolean() throws IOException Implements java. Doc from java. Reads one input byte and returns
| |
| readByte | back to summary |
|---|---|
| public final byte readByte() throws IOException Implements java. Doc from java. Reads and returns one input byte.
The byte is treated as a signed value in
the range
| |
| readChar | back to summary |
|---|---|
| public final char readChar() throws IOException Implements java. Doc from java. Reads two input bytes and returns a
This method
is suitable for reading bytes written by
the writeChar method of interface
DataOutput.
| |
| readDouble | back to summary |
|---|---|
| public final double readDouble() throws IOException Implements java. Doc from java. Reads eight input bytes and returns
a
| |
| readFloat | back to summary |
|---|---|
| public final float readFloat() throws IOException Implements java. Doc from java. Reads four input bytes and returns
a
| |
| readFully | back to summary |
|---|---|
| public final void readFully(final byte[] b) throws IOException Implements java. Doc from java. Reads some bytes from an input
stream and stores them into the buffer
array This method blocks until one of the following conditions occurs:
If
| |
| readFully | back to summary |
|---|---|
| public final void readFully(final byte[] b, final int off, final int len) throws IOException Implements java. Doc from java. Reads This method blocks until one of the following conditions occurs:
If
| |
| readInt | back to summary |
|---|---|
| public final int readInt() throws IOException Implements java. Doc from java. Reads four input bytes and returns an
This method is suitable
for reading bytes written by the writeInt
method of interface DataOutput.
| |
| readLine | back to summary |
|---|---|
| public final String readLine() throws IOException Implements java. dont call this it is not implemented.
| |
| readLong | back to summary |
|---|---|
| public final long readLong() throws IOException Implements java. Doc from java. Reads eight input bytes and returns
a
This method is suitable
for reading bytes written by the
| |
| readShort | back to summary |
|---|---|
| public final short readShort() throws IOException Implements java. Doc from java. Reads two input bytes and returns
a
This method
is suitable for reading the bytes written
by the writeShort method of
interface DataOutput.
| |
| readUnsignedByte | back to summary |
|---|---|
| public final int readUnsignedByte() throws IOException Implements java. Doc from java. Reads one input byte, zero-extends
it to type
| |
| readUnsignedShort | back to summary |
|---|---|
| public final int readUnsignedShort() throws IOException Implements java. Doc from java. Reads two input bytes and returns
an
This method is suitable for reading the bytes
written by the writeShort method
of interface DataOutput if
the argument to writeShort
was intended to be a value in the range
0 through 65535.
| |
| readUTF | back to summary |
|---|---|
| public final String readUTF() throws IOException Implements java. dont call this it is not implemented
| |
| readUTF | back to summary |
|---|---|
| public static final String readUTF(final DataInput in) throws IOException dont call this it is not implemented
| |
| skipBytes | back to summary |
|---|---|
| public final int skipBytes(final int n) throws IOException Implements java. Doc from java. Makes an attempt to skip over
| |