|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataInput
DataInput is an interface which declares methods for reading in typed data from a Stream. Typically, this stream has been written by a class which implements DataOutput. Types that can be read include byte, 16-bit short, 32-bit int, 32-bit float, 64-bit long, 64-bit double, byte strings, and UTF Strings.
DataInputStream,
RandomAccessFile| Method Summary | |
|---|---|
boolean |
readBoolean()
Reads a boolean from this stream. |
byte |
readByte()
Reads an 8-bit byte value from this stream. |
char |
readChar()
Reads a 16-bit character value from this stream. |
double |
readDouble()
Reads a 64-bit double value from this stream. |
float |
readFloat()
Reads a 32-bit float value from this stream. |
void |
readFully(byte[] buffer)
Reads bytes from this stream into the byte array buffer. |
void |
readFully(byte[] buffer,
int offset,
int count)
Read bytes from this stream and stores them in byte array buffer starting at offset offset. |
int |
readInt()
Reads a 32-bit integer value from this stream. |
String |
readLine()
Returns a String representing the next line of text
available in this BufferedReader. |
long |
readLong()
Reads a 64-bit long value from this stream. |
short |
readShort()
Reads a 16-bit short value from this stream. |
int |
readUnsignedByte()
Reads an unsigned 8-bit byte value from this stream and
returns it as an int. |
int |
readUnsignedShort()
Reads a 16-bit unsigned short value from this stream and
returns it as an int. |
String |
readUTF()
Reads a UTF format String from this Stream. |
int |
skipBytes(int count)
Skips count number of bytes in this stream. |
| Method Detail |
|---|
boolean readBoolean()
throws IOException
IOException - If a problem occurs reading from this stream.DataOutput.writeBoolean(boolean)
byte readByte()
throws IOException
IOException - If a problem occurs reading from this stream.DataOutput.writeByte(int)
char readChar()
throws IOException
char value from the source stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeChar(int)
double readDouble()
throws IOException
double value from this stream.
double value from the source stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeDouble(double)
float readFloat()
throws IOException
float value from this stream.
float value from the source stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeFloat(float)
void readFully(byte[] buffer)
throws IOException
buffer.
This method will block until buffer.length number of bytes
have been read.
buffer - the buffer to read bytes into
IOException - If a problem occurs reading from this stream.DataOutput.write(byte[]),
DataOutput.write(byte[], int, int)
void readFully(byte[] buffer,
int offset,
int count)
throws IOException
buffer starting at offset offset. This
method blocks until count number of bytes have been read.
buffer - the byte array in which to store the read bytes.offset - the offset in buffer to store the read bytes.count - the maximum number of bytes to store in buffer.
IOException - If a problem occurs reading from this stream.DataOutput.write(byte[]),
DataOutput.write(byte[], int, int)
int readInt()
throws IOException
int value from the source stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeInt(int)
String readLine()
throws IOException
String representing the next line of text
available in this BufferedReader. A line is represented by 0 or more
characters followed by '\n', '\r',
"\n\r" or end of stream. The String does
not include the newline sequence.
IOException - If a problem occurs reading from this stream.
long readLong()
throws IOException
long value from this stream.
long value from the source stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeLong(long)
short readShort()
throws IOException
short value from this stream.
short value from the source stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeShort(int)
int readUnsignedByte()
throws IOException
byte value from this stream and
returns it as an int.
IOException - If a problem occurs reading from this stream.DataOutput.writeByte(int)
int readUnsignedShort()
throws IOException
short value from this stream and
returns it as an int.
short value from the source
stream.
IOException - If a problem occurs reading from this stream.DataOutput.writeShort(int)
String readUTF()
throws IOException
IOException - If a problem occurs reading from this stream.DataOutput.writeUTF(java.lang.String)
int skipBytes(int count)
throws IOException
count number of bytes in this stream. Subsequent
read()'s will not return these bytes unless
reset() is used.
count - the number of bytes to skip.
IOException - If a problem occurs reading from this stream.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||