|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
edu.emory.mathcs.util.io.BufferedDataInputStream
Buffered data input that additionally supports deserialization of arrays of primitive types.
Field Summary | |
protected byte[] |
arr
Deprecated. |
Constructor Summary | |
BufferedDataInputStream(java.io.InputStream in)
Deprecated. Constructs buffered data input stream. |
|
BufferedDataInputStream(java.io.InputStream in,
int buffer_size)
Deprecated. Constructs buffered data input stream. |
Method Summary | |
int |
available()
Deprecated. Returns the number of available bytes in the stream. |
void |
close()
Deprecated. Closes input stream |
boolean |
markSupported()
Deprecated. Returns whether mark operation is supported. |
int |
read()
Deprecated. Reads one byte of range 0 to 255, inclusive. |
int |
read(byte[] array)
Deprecated. Reads at most array.length bytes into the array array. |
int |
read(byte[] array,
int off,
int lng)
Deprecated. Reads lng bytes into the array array begining at offset off. |
boolean |
readBoolean()
Deprecated. Reads a boolean from the stream. |
boolean[] |
readBooleans(boolean[] array,
int off,
int lng)
Deprecated. Reads exactly lng of booleans from the stream and stores them in the array starting from off. |
byte |
readByte()
Deprecated. Reads a byte from the stream. |
byte[] |
readBytes(byte[] array,
int off,
int lng)
Deprecated. Reads exactly lng of bytes from the stream and stores them in the array starting from off. |
char |
readChar()
Deprecated. Reads a char from the stream. |
char[] |
readChars(char[] array,
int off,
int lng)
Deprecated. Reads exactly lng of chars (2*lng bytes) from the stream and stores them in the array starting from off. |
double |
readDouble()
Deprecated. Reads a double from the stream. |
double[] |
readDoubles(double[] array,
int off,
int lng)
Deprecated. Reads exactly lng of doubles (8*lng bytes) from the stream and stores them in the array starting from off. |
float |
readFloat()
Deprecated. Reads a float from the stream. |
float[] |
readFloats(float[] array,
int off,
int lng)
Deprecated. Reads exactly lng of floats (4*lng bytes) from the stream and stores them in the array starting from off. |
void |
readFully(byte[] bytes)
Deprecated. Reads an array of bytes from the stream into the array. |
void |
readFully(byte[] bytes,
int off,
int lng)
Deprecated. Reads an array of bytes from the stream into the array. |
int |
readInt()
Deprecated. Reads an integer from the stream. |
int[] |
readInts(int[] array,
int off,
int lng)
Deprecated. Reads exactly lng of integers (4*lng bytes) from the stream and stores them in the array starting from off. |
java.lang.String |
readLine()
Deprecated. Does not convert chars properly. |
long |
readLong()
Deprecated. Reads a long from the stream. |
long[] |
readLongs(long[] array,
int off,
int lng)
Deprecated. Reads exactly lng of longs (8*lng bytes) from the stream and stores them in the array starting from off. |
short |
readShort()
Deprecated. Reads a short from the stream. |
short[] |
readShorts(short[] array,
int off,
int lng)
Deprecated. Reads exactly lng of shorts (2*lng bytes) from the stream and stores them in the array starting from off. |
protected java.lang.String |
readStringUTFBytes(int lng)
Deprecated. |
int |
readUnsignedByte()
Deprecated. Reads an unsigned byte from the stream. |
int |
readUnsignedShort()
Deprecated. Reads an unsigned short from the stream. |
java.lang.String |
readUTF()
Deprecated. Reads a string in the UTF format from the stream. |
long |
skip(long skip)
Deprecated. Skips at most skip bytes. |
int |
skipBytes(int skip)
Deprecated. Skips at most skip bytes. |
Methods inherited from class java.io.InputStream |
mark, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final byte[] arr
Constructor Detail |
public BufferedDataInputStream(java.io.InputStream in) throws java.io.IOException
in
- the underlying input stream.public BufferedDataInputStream(java.io.InputStream in, int buffer_size) throws java.io.IOException
in
- the underlying input stream.buffer_size
- the size of the data bufferMethod Detail |
public int read(byte[] array) throws java.io.IOException
java.io.IOException
public int read(byte[] array, int off, int lng) throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
java.io.IOException
public boolean markSupported()
public int available() throws java.io.IOException
java.io.IOException
public long skip(long skip) throws java.io.IOException
java.io.IOException
public int skipBytes(int skip) throws java.io.IOException
skipBytes
in interface java.io.DataInput
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public boolean readBoolean() throws java.io.IOException
readBoolean
in interface java.io.DataInput
java.io.IOException
public byte readByte() throws java.io.IOException
readByte
in interface java.io.DataInput
java.io.IOException
public int readUnsignedByte() throws java.io.IOException
readUnsignedByte
in interface java.io.DataInput
java.io.IOException
public char readChar() throws java.io.IOException
readChar
in interface java.io.DataInput
java.io.IOException
public short readShort() throws java.io.IOException
readShort
in interface java.io.DataInput
java.io.IOException
public int readUnsignedShort() throws java.io.IOException
readUnsignedShort
in interface java.io.DataInput
java.io.IOException
public int readInt() throws java.io.IOException
readInt
in interface java.io.DataInput
java.io.IOException
public long readLong() throws java.io.IOException
readLong
in interface java.io.DataInput
java.io.IOException
public float readFloat() throws java.io.IOException
readFloat
in interface java.io.DataInput
java.io.IOException
public double readDouble() throws java.io.IOException
readDouble
in interface java.io.DataInput
java.io.IOException
public byte[] readBytes(byte[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no bytes are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public boolean[] readBooleans(boolean[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no booleans are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public char[] readChars(char[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no chars are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public short[] readShorts(short[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no shorts are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public int[] readInts(int[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no ints are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public float[] readFloats(float[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no floats are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public long[] readLongs(long[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no longs are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public double[] readDoubles(double[] array, int off, int lng) throws java.io.IOException
If array is null NullPointerException is thrown.
If off is negative, or lng is negative, or off+lng is grater than array length then IndexOutOfBoundsException is thrown.
If lng is 0 or array length is 0 then no doubles are read.
If EOF is reached before the lng of bytes is read then EOFException is thrown.
java.io.IOException
- when I/O error occurs, or EOFException when EOF is reached during the reading.public java.lang.String readUTF() throws java.io.IOException
readUTF
in interface java.io.DataInput
java.io.IOException
protected java.lang.String readStringUTFBytes(int lng) throws java.io.IOException
java.io.IOException
public java.lang.String readLine() throws java.io.IOException
Reads a string from the stream.
readLine
in interface java.io.DataInput
java.io.IOException
public void readFully(byte[] bytes) throws java.io.IOException
readFully
in interface java.io.DataInput
java.io.IOException
readBytes(byte[],int,int)
public void readFully(byte[] bytes, int off, int lng) throws java.io.IOException
readFully
in interface java.io.DataInput
java.io.IOException
readBytes(byte[],int,int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |