Package java.io
Class WriteAbortedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException
java.io.WriteAbortedException
- All Implemented Interfaces:
Serializable
public class WriteAbortedException extends ObjectStreamException
Signals that the
ObjectInputStream.readObject() method has detected
an exception marker in the input stream. This marker indicates that exception
occurred when the object was serialized, and this marker was inserted instead
of the original object. It is a way to "propagate" an exception from the code
that attempted to write the object to the code that is attempting to read the
object.- See Also:
ObjectInputStream.readObject(), Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description WriteAbortedException(String detailMessage, Exception rootCause)Constructs a newWriteAbortedExceptionwith its stack trace, detail message and the exception which caused the underlying problem when serializing the object filled in. -
Method Summary
Modifier and Type Method Description ThrowablegetCause()Gets the cause of this exception ornullif there is no cause.StringgetMessage()Gets the extra information message which was provided when this exception was created.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
detail
The exception that occured when writeObject() was attempting to serialize the object.
-
-
Constructor Details
-
WriteAbortedException
Constructs a newWriteAbortedExceptionwith its stack trace, detail message and the exception which caused the underlying problem when serializing the object filled in.- Parameters:
detailMessage- the detail message for this exception.rootCause- the exception that was thrown when serializing the object.
-
-
Method Details
-
getMessage
Gets the extra information message which was provided when this exception was created. Returnsnullif no message was provided at creation time.- Overrides:
getMessagein classThrowable- Returns:
- the exception message.
-
getCause
Gets the cause of this exception ornullif there is no cause.
-