public class LittleEndianInputStream extends java.io.FilterInputStream implements LittleEndianInput
InputStream providing LittleEndianInputThis class does not buffer any input, so the stream read position maintained by this class is consistent with that of the inner stream.
| Constructor and Description |
|---|
LittleEndianInputStream(java.io.InputStream is) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
int |
getReadIndex() |
void |
mark(int readlimit) |
int |
read(byte[] b,
int off,
int len) |
byte |
readByte() |
double |
readDouble() |
float |
readFloat()
get a float value, reads it in little endian format
then converts the resulting revolting IEEE 754 (curse them) floating
point number to a happy java float
|
void |
readFully(byte[] buf) |
void |
readFully(byte[] buf,
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()
get an unsigned int value from an InputStream
|
int |
readUShort() |
void |
reset() |
void |
skipFully(int len) |
public int available()
available in interface LittleEndianInputavailable in class java.io.FilterInputStreampublic byte readByte()
readByte in interface LittleEndianInputpublic int readUByte()
readUByte in interface LittleEndianInputpublic float readFloat()
public double readDouble()
readDouble in interface LittleEndianInputpublic int readInt()
readInt in interface LittleEndianInputpublic long readUInt()
java.lang.RuntimeException - wraps any IOException thrown from reading the stream.public long readLong()
readLong in interface LittleEndianInputpublic short readShort()
readShort in interface LittleEndianInputpublic int readUShort()
readUShort in interface LittleEndianInputpublic void readFully(byte[] buf)
readFully in interface LittleEndianInputpublic void readFully(byte[] buf,
int off,
int len)
readFully in interface LittleEndianInputpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.FilterInputStreampublic void reset()
throws java.io.IOException
reset in class java.io.FilterInputStreamjava.io.IOExceptionpublic int getReadIndex()
public 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 fillpublic void skipFully(int len)
throws java.io.IOException
java.io.IOExceptionCopyright 2022 The Apache Software Foundation or its licensors, as applicable.