Interface java.io.DataInput
All Packages Class Hierarchy This Package Previous Next Index
Interface java.io.DataInput
- public interface DataInput
- extends Object
DataInput is an interface describing streams that can read inputn
in a machine-independent format.
- See Also:
- DataInputStream, DataOutput
-
readBoolean()
- Reads in a boolean.
-
readByte()
- Reads an 8 bit byte.
-
readChar()
- Reads a 16 bit char.
-
readDouble()
- Reads a 64 bit double.
-
readFloat()
- Reads a 32 bit float.
-
readFully(byte[])
- Reads bytes, blocking until all bytes are read.
-
readFully(byte[], int, int)
- Reads bytes, blocking until all bytes are read.
-
readInt()
- Reads a 32 bit int.
-
readLine()
-
-
readLong()
- Reads a 64 bit long.
-
readShort()
- Reads 16 bit short.
-
readUTF()
-
-
readUnsignedByte()
- Reads an unsigned 8 bit byte.
-
readUnsignedShort()
- Reads an unsigned 16 bit short.
-
skipBytes(int)
- Skips bytes, block until all bytes are skipped.
readFully
public abstract void readFully(byte b[]) throws IOException
- Reads bytes, blocking until all bytes are read.
- Parameters:
- b - the buffer into which the data is read
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readFully
public abstract void readFully(byte b[],
int off,
int len) throws IOException
- Reads bytes, blocking until all bytes are read.
- Parameters:
- b - the buffer into which the data is read
- off - the start offset of the data
- len - the maximum number of bytes to read
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
skipBytes
public abstract int skipBytes(int n) throws IOException
- Skips bytes, block until all bytes are skipped.
- Parameters:
- n - the number of bytes to be skipped
- Returns:
- the actual number of bytes skipped.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readBoolean
public abstract boolean readBoolean() throws IOException
- Reads in a boolean.
- Returns:
- the boolean read.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readByte
public abstract byte readByte() throws IOException
- Reads an 8 bit byte.
- Returns:
- the 8 bit byte read.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readUnsignedByte
public abstract int readUnsignedByte() throws IOException
- Reads an unsigned 8 bit byte.
- Returns:
- the 8 bit byte read.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readShort
public abstract short readShort() throws IOException
- Reads 16 bit short.
- Returns:
- the read 16 bit short.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readUnsignedShort
public abstract int readUnsignedShort() throws IOException
- Reads an unsigned 16 bit short.
- Returns:
- the read 16 bit short.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readChar
public abstract char readChar() throws IOException
- Reads a 16 bit char.
- Returns:
- the read 16 bit char.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readInt
public abstract int readInt() throws IOException
- Reads a 32 bit int.
- Returns:
- the read 32 bit integer.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readLong
public abstract long readLong() throws IOException
- Reads a 64 bit long.
- Returns:
- the read 64 bit long.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readFloat
public abstract float readFloat() throws IOException
- Reads a 32 bit float.
- Returns:
- the read 32 bit float.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readDouble
public abstract double readDouble() throws IOException
- Reads a 64 bit double.
- Returns:
- the read 64 bit double.
- Throws: EOFException
- If end of file is reached.
- Throws: IOException
- If other I/O error has occurred.
readLine
public abstract String readLine() throws IOException
readUTF
public abstract String readUTF() throws IOException
All Packages Class Hierarchy This Package Previous Next Index