public class ThrowableObjectOutputStream extends ObjectOutputStream
ObjectOutputStream.PutFieldbaseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING| Constructor and Description |
|---|
ThrowableObjectOutputStream(OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canSerialize(Throwable t)
Returns
true iff the exception can be serialized and deserialized using
ThrowableObjectOutputStream and ThrowableObjectInputStream. |
static <T extends Serializable> |
serialize(T t)
Simple helper method to roundtrip a serializable object within the ThrowableObjectInput/Output stream
|
protected void |
writeClassDescriptor(ObjectStreamClass desc) |
protected void |
writeStreamHeader() |
annotateClass, annotateProxyClass, close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, replaceObject, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeUnshared, writeUTFpublic ThrowableObjectOutputStream(OutputStream out) throws IOException
IOExceptionprotected void writeStreamHeader()
throws IOException
writeStreamHeader in class ObjectOutputStreamIOExceptionprotected void writeClassDescriptor(ObjectStreamClass desc) throws IOException
writeClassDescriptor in class ObjectOutputStreamIOExceptionpublic static <T extends Serializable> T serialize(T t) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic static boolean canSerialize(Throwable t)
true iff the exception can be serialized and deserialized using
ThrowableObjectOutputStream and ThrowableObjectInputStream. Otherwise falseCopyright © 2009–2016. All rights reserved.