public class LittleEndianByteArrayInputStream extends java.io.ByteArrayInputStream implements LittleEndianInput
LittleEndianInput| Constructor and Description |
|---|
LittleEndianByteArrayInputStream(byte[] buf)
Creates a
LittleEndianByteArrayInputStream
so that it uses buf as its
buffer array. |
LittleEndianByteArrayInputStream(byte[] buf,
int offset)
Creates
LittleEndianByteArrayInputStream
that uses buf as its
buffer array. |
LittleEndianByteArrayInputStream(byte[] buf,
int offset,
int length)
Creates
LittleEndianByteArrayInputStream
that uses buf as its
buffer array. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPosition(int i) |
int |
getReadIndex() |
byte |
readByte() |
double |
readDouble() |
void |
readFully(byte[] buffer) |
void |
readFully(byte[] buffer,
int off,
int len) |
int |
readInt() |
long |
readLong() |
void |
readPlain(byte[] buf,
int off,
int len)
Usually acts the same as
LittleEndianInput.readFully(byte[], int, int), but
for an encrypted stream the raw (unencrypted) data is filled |
short |
readShort() |
int |
readUByte() |
long |
readUInt() |
int |
readUShort() |
void |
setReadIndex(int pos) |
available, close, mark, markSupported, read, read, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailablepublic LittleEndianByteArrayInputStream(byte[] buf,
int offset,
int length)
LittleEndianByteArrayInputStream
that uses buf as its
buffer array. The initial value of pos
is offset and the initial value
of count is the minimum of offset+length
and buf.length.
The buffer array is not copied. The buffer's mark is
set to the specified offset.buf - the input buffer.offset - the offset in the buffer of the first byte to read.length - the maximum number of bytes to read from the buffer.public LittleEndianByteArrayInputStream(byte[] buf,
int offset)
LittleEndianByteArrayInputStream
that uses buf as its
buffer array. The initial value of pos
is offset and the initial value
of count is the minimum of offset+buf.length
and buf.length.
The buffer array is not copied. The buffer's mark is
set to the specified offset.buf - the input buffer.offset - the offset in the buffer of the first byte to read.public LittleEndianByteArrayInputStream(byte[] buf)
LittleEndianByteArrayInputStream
so that it uses buf as its
buffer array.
The buffer array is not copied.
The initial value of pos
is 0 and the initial value
of count is the length of
buf.buf - the input buffer.protected void checkPosition(int i)
public int getReadIndex()
public void setReadIndex(int pos)
public byte readByte()
readByte in interface LittleEndianInputpublic int readInt()
readInt in interface LittleEndianInputpublic long readLong()
readLong in interface LittleEndianInputpublic short readShort()
readShort in interface LittleEndianInputpublic int readUByte()
readUByte in interface LittleEndianInputpublic int readUShort()
readUShort in interface LittleEndianInputpublic long readUInt()
public double readDouble()
readDouble in interface LittleEndianInputpublic void readFully(byte[] buffer,
int off,
int len)
readFully in interface LittleEndianInputpublic void readFully(byte[] buffer)
readFully in interface LittleEndianInputpublic void readPlain(byte[] buf,
int off,
int len)
LittleEndianInputLittleEndianInput.readFully(byte[], int, int), but
for an encrypted stream the raw (unencrypted) data is filledreadPlain in interface LittleEndianInputbuf - the byte array to receive the bytesoff - the start offset into the byte arraylen - the amount of bytes to fillCopyright 2020 The Apache Software Foundation or its licensors, as applicable.