|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
DataInput is an interface describing streams that can read input in a machine-independent format.
DataInputStream,
DataOutput| Method Summary | |
boolean |
readBoolean()
Reads in a boolean. |
byte |
readByte()
Reads an 8 bit byte. |
char |
readChar()
Reads a 16 bit char. |
double |
readDouble()
Reads a 64 bit double. |
float |
readFloat()
Reads a 32 bit float. |
void |
readFully(byte[] b)
Reads bytes, blocking until all bytes are read. |
void |
readFully(byte[] b,
int off,
int len)
Reads bytes, blocking until all bytes are read. |
int |
readInt()
Reads a 32 bit int. |
String |
readLine()
|
long |
readLong()
Reads a 64 bit long. |
short |
readShort()
Reads a 16 bit short. |
int |
readUnsignedByte()
Reads an unsigned 8 bit byte. |
int |
readUnsignedShort()
Reads an unsigned 16 bit short. |
String |
readUTF()
|
int |
skipBytes(int n)
Skips bytes, block until all bytes are skipped. |
| Method Detail |
public void readFully(byte[] b)
throws IOException
b - the buffer into which the data is read
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public void readFully(byte[] b,
int off,
int len)
throws IOException
b - the buffer into which the data is readoff - the start offset of the datalen - the maximum number of bytes to read
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public int skipBytes(int n)
throws IOException
n - the number of bytes to be skipped
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public boolean readBoolean()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public byte readByte()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public int readUnsignedByte()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public short readShort()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public int readUnsignedShort()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public char readChar()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public int readInt()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public long readLong()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public float readFloat()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public double readDouble()
throws IOException
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.
public String readLine()
throws IOException
IOException
public String readUTF()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||