java.io
Class OptionalDataException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.io.IOException
|
+--java.io.ObjectStreamException
|
+--java.io.OptionalDataException
This exception is thrown when unexpected data appears in the input
stream from which a serialized object is being read. There are two
cases:
- The next stream element is primitive data.
eof will
be false, and count is the number of bytes of primitive
data available.
- The data consumable by readObject or readExternal has been exhausted.
eof is true, and count is 0.
Since:Authors:- Aaron M. Renn (arenn@urbanophile.com)
- Warren Levy <warrenl@cygnus.com>
eof
public boolean eof Whether or not the end of the stream has been reached.
length
public int length The number of valid bytes that can be read.
eofwill be false, andcountis the number of bytes of primitive data available.eofis true, andcountis 0.