public final class LittleEndianDataInputStream extends InputStream
| Constructor and Description |
|---|
LittleEndianDataInputStream(InputStream in)
Creates a LittleEndianDataInputStream that uses the specified
underlying InputStream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
equals(Object obj) |
int |
hashCode() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
boolean |
readBoolean()
See the general contract of the
readBoolean
method of DataInput. |
byte |
readByte()
See the general contract of the
readByte
method of DataInput. |
double |
readDouble()
Bytes
for this operation are read from the contained
input stream.
|
float |
readFloat()
Bytes
for this operation are read from the contained
input stream.
|
void |
readFully(byte[] b)
See the general contract of the
readFully
method of DataInput. |
void |
readFully(byte[] b,
int off,
int len)
See the general contract of the
readFully
method of DataInput. |
int |
readInt()
Bytes
for this operation are read from the contained
input stream.
|
long |
readLong()
Bytes
for this operation are read from the contained
input stream.
|
short |
readShort()
Bytes
for this operation are read from the contained
input stream.
|
int |
readUnsignedByte()
See the general contract of the
readUnsignedByte
method of DataInput. |
int |
readUnsignedShort()
Bytes
for this operation are read from the contained
input stream.
|
void |
reset() |
long |
skip(long n) |
int |
skipBytes(int n)
See the general contract of the
skipBytes
method of DataInput. |
public LittleEndianDataInputStream(InputStream in)
in - the specified input streampublic final void readFully(byte[] b)
throws IOException
readFully
method of DataInput.
Bytes for this operation are read from the contained input stream.
b - the buffer into which the data is read.EOFException - if this input stream reaches the end before
reading all the bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final void readFully(byte[] b,
int off,
int len)
throws IOException
readFully
method of DataInput.
Bytes for this operation are read from the contained input stream.
b - the buffer into which the data is read.off - the start offset of the data.len - the number of bytes to read.EOFException - if this input stream reaches the end before
reading all the bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final int skipBytes(int n)
throws IOException
skipBytes
method of DataInput.
Bytes for this operation are read from the contained input stream.
n - the number of bytes to be skipped.IOException - if the contained input stream does not support
seek, or the stream has been closed and
the contained input stream does not support
reading after close, or another I/O error occurs.public int read()
throws IOException
read in class InputStreamIOException - if there is an exception while readingInputStream.read()public int hashCode()
hashCode in class ObjectObject.hashCode()public int read(byte[] b)
throws IOException
read in class InputStreamb - a byte arrayIOException - if there was an exception while readingInputStream.read(byte[])public boolean equals(Object obj)
equals in class Objectobj - another objectObject.equals(java.lang.Object)public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamb - a byte arrayoff - an offset into the byte arraylen - the length to readIOException - if there was an exception while readingInputStream.read(byte[], int, int)public long skip(long n)
throws IOException
skip in class InputStreamn - the number of bytes to skipIOException - if there was an exception while readingInputStream.skip(long)public int available()
throws IOException
available in class InputStreamIOException - if there was an exception while getting the number of available bytesInputStream.available()public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException - if there was an exception while closing the underlying streamInputStream.close()public void mark(int readlimit)
mark in class InputStreamreadlimit - the number of bytes the mark will be valid forInputStream.mark(int)public void reset()
throws IOException
reset in class InputStreamIOException - if there is an exception while resetting the underlying streamInputStream.reset()public boolean markSupported()
markSupported in class InputStreamInputStream.markSupported()public final boolean readBoolean()
throws IOException
readBoolean
method of DataInput.
Bytes for this operation are read from the contained input stream.
boolean value read.EOFException - if this input stream has reached the end.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final byte readByte()
throws IOException
readByte
method of DataInput.
Bytes for this operation are read from the contained input stream.
byte.EOFException - if this input stream has reached the end.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final int readUnsignedByte()
throws IOException
readUnsignedByte
method of DataInput.
Bytes for this operation are read from the contained input stream.
EOFException - if this input stream has reached the end.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final short readShort()
throws IOException
EOFException - if this input stream reaches the end before
reading two bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final int readUnsignedShort()
throws IOException
EOFException - if this input stream reaches the end before
reading two bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final int readInt()
throws IOException
int.EOFException - if this input stream reaches the end before
reading four bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final long readLong()
throws IOException
long.EOFException - if this input stream reaches the end before
reading eight bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.FilterInputStream.inpublic final float readFloat()
throws IOException
float.EOFException - if this input stream reaches the end before
reading four bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.Float.intBitsToFloat(int)public final double readDouble()
throws IOException
double.EOFException - if this input stream reaches the end before
reading eight bytes.IOException - the stream has been closed and the contained
input stream does not support reading after close, or
another I/O error occurs.Double.longBitsToDouble(long)Copyright © 2018 The Apache Software Foundation. All rights reserved.