public class ByteOrderInputStream extends BitInputStream implements DataInput
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
little |
BIT_MASK, FIELD_MASK, MASK_SIZE, ONES, ZERO| Constructor and Description |
|---|
ByteOrderInputStream(InputStream in)
Create a byte order (big-endian) input stream from given stream.
|
ByteOrderInputStream(InputStream in,
boolean littleEndian)
Create a byte order input stream from given stream.
|
| Modifier and Type | Method and Description |
|---|---|
String |
readAsciiZString()
Read an ascii-z (0 terminated c-string).
|
boolean |
readBoolean() |
byte |
readByte()
Read a signed byte.
|
byte[] |
readByte(int n)
Read n bytes and return in byte array.
|
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt()
Read a signed integer.
|
int[] |
readInt(int n)
Read n ints and return in int array.
|
String |
readLine()
Deprecated.
|
long |
readLong() |
short |
readShort()
Read a signed short.
|
short[] |
readShort(int n)
Read n shorts and return in short array
|
String |
readString()
Read a string (UTF).
|
int |
readUnsignedByte()
Read an unsigned byte.
|
int[] |
readUnsignedByte(int n)
Read n unsigned bytes and return in int array.
|
long |
readUnsignedInt()
Read an unsigned integer.
|
long[] |
readUnsignedInt(int n)
Read n unsigned ints and return in long array.
|
int |
readUnsignedShort()
Read an unsigned short.
|
int[] |
readUnsignedShort(int n)
Read n unsigned shorts and return in int array
|
String |
readUTF() |
int |
skipBytes(int n) |
byteAlign, fetchByte, readBitFlag, readFBits, readSBits, readUBitsread, skip, startDecompressingreadavailable, close, mark, markSupported, read, resetpublic ByteOrderInputStream(InputStream in)
in - stream to read frompublic ByteOrderInputStream(InputStream in, boolean littleEndian)
in - stream to read fromlittleEndian - true if stream should be little endian.public void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic byte[] readByte(int n)
throws IOException
n - number of bytes to readIOException - if read failspublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic int[] readUnsignedByte(int n)
throws IOException
n - number of bytes to readIOException - if read failspublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic short[] readShort(int n)
throws IOException
n - number of shorts to readIOException - if read failspublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic int[] readUnsignedShort(int n)
throws IOException
n - number of shorts to readIOException - if read failspublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic int[] readInt(int n)
throws IOException
n - number of ints to readIOException - if read failspublic long readUnsignedInt()
throws IOException
IOException - if read failspublic long[] readUnsignedInt(int n)
throws IOException
n - number of ints to readIOException - if read failspublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOException@Deprecated public String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readString() throws IOException
IOException - if read failspublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic String readAsciiZString() throws IOException
IOException - if read failsCopyright © 2016. All rights reserved.