Interface java.io.DataInput
All Packages    This Package    Previous    Next

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
Version:
1.5, 08/15/95
Author:
Frank Yellin

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 16 bit short.
 o readUTF()
 o readUnsignedByte()
Reads an unsigned 8 bit byte.
 o readUnsignedShort()
Reads an unsigned 16 bit short.
 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 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.

 o 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.

 o 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.

 o 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.

 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 read 32 bit float.
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 read 64 bit double.
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    This Package    Previous    Next