| Modifier and Type | Field and Description |
|---|---|
protected DataInputStream |
dis
to get at the big-Endian methods of a basic DataInputStream
|
protected InputStream |
is
to get at the a basic readBytes method.
|
protected byte[] |
work
work array for buffering input.
|
| Constructor and Description |
|---|
LEDataInputStream(InputStream in)
constructor.
|
LEDataInputStream(String filename) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close.
|
int |
read(byte[] ba,
int off,
int len)
Read bytes.
|
boolean |
readBoolean()
read only a one-byte boolean.
|
boolean[] |
readBoolean(int len) |
byte |
readByte()
read byte.
|
byte[] |
readByte(int len) |
char |
readChar()
Read on char.
|
char[] |
readChar(int len) |
double |
readDouble()
Read a double.
|
double[] |
readDouble(int len) |
int[] |
readDoubleToInt(int len) |
float |
readFloat()
Read one float.
|
float[] |
readFloat(int len) |
void |
readFully(byte[] ba)
Read bytes until the array is filled.
|
void |
readFully(byte[] ba,
int off,
int len)
Read bytes until the count is satisfied.
|
int |
readInt()
Read an int, 32-bits.
|
int[] |
readInt(int len) |
String |
readLine()
Deprecated.
This method does not properly convert bytes to characters. Use a Reader instead with a little-endian encoding.
|
long |
readLong()
read a long, 64-bits.
|
long[] |
readLong(int len) |
short |
readShort()
Read short, 16-bits.
|
short[] |
readShort(int len) |
int |
readUnsignedByte()
Read an unsigned byte.
|
int[] |
readUnsignedByte(int len) |
int |
readUnsignedShort()
Read an unsigned short, 16 bits.
|
int[] |
readUnsignedShort(int len) |
String |
readUTF()
Read UTF counted string.
|
static String |
readUTF(DataInput in)
Note.
|
int |
skipBytes(int n)
Skip over bytes in the stream.
|
protected final DataInputStream dis
protected final InputStream is
protected final byte[] work
public LEDataInputStream(InputStream in)
in - binary inputstream of little-endian data.public LEDataInputStream(String filename) throws FileNotFoundException
FileNotFoundExceptionpublic static String readUTF(DataInput in) throws IOException
in - stream to read UTF chars from (endian irrelevant)IOException - if read fails.public final void close()
throws IOException
IOException - if close fails.public final int read(byte[] ba,
int off,
int len)
throws IOException
ba - where the bytes go.off - offset in buffer, not offset in file.len - count of bytes to read.IOException - if read fails.public final boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOException - if read fails.DataInput.readBoolean()public final boolean[] readBoolean(int len)
throws IOException
IOExceptionpublic final byte readByte()
throws IOException
readByte in interface DataInputIOException - if read fails.DataInput.readByte()public final byte[] readByte(int len)
throws IOException
IOExceptionpublic final char readChar()
throws IOException
readChar in interface DataInputIOException - if read fails.public final char[] readChar(int len)
throws IOException
IOExceptionpublic final double readDouble()
throws IOException
readDouble in interface DataInputIOException - IOExceptionpublic final double[] readDouble(int len)
throws IOException
IOExceptionpublic final int[] readDoubleToInt(int len)
throws IOException
IOExceptionpublic final float readFloat()
throws IOException
readFloat in interface DataInputIOException - if read fails.public final float[] readFloat(int len)
throws IOException
IOExceptionpublic final void readFully(byte[] ba)
throws IOException
readFully in interface DataInputIOExceptionDataInput.readFully(byte[])public final void readFully(byte[] ba,
int off,
int len)
throws IOException
readFully in interface DataInputIOException - if read fails.DataInput.readFully(byte[],int,int)public final int readInt()
throws IOException
readInt in interface DataInputIOException - if read fails.public final int[] readInt(int len)
throws IOException
IOExceptionpublic final String readLine() throws IOException
readLine in interface DataInputIOException - IOExceptionpublic final long readLong()
throws IOException
readLong in interface DataInputIOException - IOExceptionpublic final long[] readLong(int len)
throws IOException
IOExceptionpublic final short readShort()
throws IOException
readShort in interface DataInputIOException - if read fails.public final short[] readShort(int len)
throws IOException
IOExceptionpublic final String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic final int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOException - if read fails.DataInput.readUnsignedByte()public final int[] readUnsignedByte(int len)
throws IOException
IOExceptionpublic final int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOException - if read fails.public final int[] readUnsignedShort(int len)
throws IOException
IOExceptionpublic final int skipBytes(int n)
throws IOException
Skip over bytes in the stream. See the general contract of the skipBytes method of DataInput.
skipBytes in interface DataInputn - the number of bytes to be skipped.IOException - if an I/O error occurs.Copyright © 2000–2016 DFKI GmbH. All rights reserved.