ObjectInput extends the DataInput interface to include the reading of
objects. DataInput includes methods for the input of primitive types,
ObjectInput extends that interface to include objects, arrays, and Strings.
author: unascribed version: 1.26, 05/05/07 See Also:java.io.InputStream See Also:java.io.ObjectOutputStream See Also:java.io.ObjectInputStream since: JDK1.1
Method Summary
public int
available() Returns the number of bytes that can be read
without blocking.
Reads a byte of data. This method will block if no input is
available.
the byte read, or -1 if the end of thestream is reached. exception: IOException - If an I/O error has occurred.
Reads into an array of bytes. This method will
block until some input is available.
Parameters: b - the buffer into which the data is read the actual number of bytes read, -1 isreturned when the end of the stream is reached. exception: IOException - If an I/O error has occurred.
Reads into an array of bytes. This method will
block until some input is available.
Parameters: b - the buffer into which the data is read Parameters: off - the start offset of the data Parameters: len - the maximum number of bytes read the actual number of bytes read, -1 isreturned when the end of the stream is reached. exception: IOException - If an I/O error has occurred.
Read and return an object. The class that implements this interface
defines where the object is "read" from.
the object read from the stream exception: java.lang.ClassNotFoundException - If the class of a serializedobject cannot be found. exception: IOException - If any of the usual Input/Outputrelated exceptions occur.
Skips n bytes of input.
Parameters: n - the number of bytes to be skipped the actual number of bytes skipped. exception: IOException - If an I/O error has occurred.