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.in
public 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.in
public 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 InputStream
IOException
InputStream.read()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public int read(byte[] b) throws IOException
read
in class InputStream
b
- IOException
InputStream.read(byte[])
public boolean equals(Object obj)
equals
in class Object
obj
- Object.equals(java.lang.Object)
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
b
- off
- len
- IOException
InputStream.read(byte[], int, int)
public long skip(long n) throws IOException
skip
in class InputStream
n
- IOException
InputStream.skip(long)
public int available() throws IOException
available
in class InputStream
IOException
InputStream.available()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
InputStream.close()
public void mark(int readlimit)
mark
in class InputStream
readlimit
- InputStream.mark(int)
public void reset() throws IOException
reset
in class InputStream
IOException
InputStream.reset()
public boolean markSupported()
markSupported
in class InputStream
InputStream.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.in
public 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.in
public 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.in
public 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.in
public 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.in
public 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.in
public 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.in
public 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 © 2015. All rights reserved.