Package java.io
Class NotSerializableException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- java.io.ObjectStreamException
-
- java.io.NotSerializableException
-
- All Implemented Interfaces:
Serializable
public class NotSerializableException extends ObjectStreamException
Signals that an object that is not serializable has been passed into theObjectOutput.writeObject()method. This can happen if the object does not implementSerializableorExternalizable, or if it is serializable but it overrideswriteObject(ObjectOutputStream)and explicitly prevents serialization by throwing this type of exception.
-
-
Constructor Summary
Constructors Constructor Description NotSerializableException()Constructs a newNotSerializableExceptionwith its stack trace filled in.NotSerializableException(String detailMessage)Constructs a newNotSerializableExceptionwith its stack trace and detail message filled in.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NotSerializableException
public NotSerializableException()
Constructs a newNotSerializableExceptionwith its stack trace filled in.
-
NotSerializableException
public NotSerializableException(String detailMessage)
Constructs a newNotSerializableExceptionwith its stack trace and detail message filled in.- Parameters:
detailMessage- the detail message for this exception.
-
-