java.io
Class OptionalDataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException
java.io.OptionalDataException
- All Implemented Interfaces:
- Serializable
public class OptionalDataException
- extends ObjectStreamException
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:
- 1.1
- See Also:
- Serialized Form
Field Summary |
boolean |
eof
Whether or not the end of the stream has been reached. |
int |
length
The number of valid bytes that can be read. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
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.