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 input in a machine-independent format.
See Also:
DataInputStream, DataOutput

Method Index

 o readBoolean()
Reads in a boolean.
 o readByte()
Reads an 8 bit byte.
 o readChar()
Reads a 16 bit char.
 o readDouble()
Reads a 64 bit double.
 o readFloat()
Reads a 32 bit float.
 o readFully(byte[])
Reads bytes, blocking until all bytes are read.
 o readFully(byte[], int, int)
Reads bytes, blocking until all bytes are read.
 o readInt()
Reads a 32 bit int.
 o readLine()
 o readLong()
Reads a 64 bit long.
 o readShort()
Reads a 16 bit short.
 o readUnsignedByte()
Reads an unsigned 8 bit byte.
 o readUnsignedShort()
Reads an unsigned 16 bit short.
 o readUTF()
 o skipBytes(int)
Skips bytes, block until all bytes are skipped.

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o readShort
  public abstract short readShort() throws IOException
Reads a 16 bit short.
Returns:
the 16 bit short read.
Throws: EOFException
If end of file is reached.
Throws: IOException
If other I/O error has occurred.
 o readUnsignedShort
  public abstract int readUnsignedShort() throws IOException
Reads an unsigned 16 bit short.
Returns:
the 16 bit short read.
Throws: EOFException
If end of file is reached.
Throws: IOException
If other I/O error has occurred.
 o readChar
  public abstract char readChar() throws IOException
Reads a 16 bit char.
Returns:
the 16 bit char read.
Throws: EOFException
If end of file is reached.
Throws: IOException
If other I/O error has occurred.
 o readInt
  public abstract int readInt() throws IOException
Reads a 32 bit int.
Returns:
the 32 bit integer read.
Throws: EOFException
If end of file is reached.
Throws: IOException
If other I/O error has occurred.
 o 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.
 o readFloat
  public abstract float readFloat() throws IOException
Reads a 32 bit float.
Returns:
the 32 bit float read.
Throws: EOFException
If end of file is reached.
Throws: IOException
If other I/O error has occurred.
 o readDouble
  public abstract double readDouble() throws IOException
Reads a 64 bit double.
Returns:
the 64 bit double read.
Throws: EOFException
If end of file is reached.
Throws: IOException
If other I/O error has occurred.
 o readLine
  public abstract String readLine() throws IOException
 o readUTF
  public abstract String readUTF() throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index