public final class SerialMarshaller extends AbstractMarshaller implements Marshaller, ExtendedObjectStreamConstants
byteOutput, classExternalizerFactory, classResolver, classTable, configuredVersion, creator, externalizerFactory, objectResolver, objectTable, streamHeader
TC_CLASSTABLEDESC, TC_OBJECTTABLE
baseWireHandle, 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
Modifier and Type | Method and Description |
---|---|
void |
clearClassCache()
Discard the class cache.
|
void |
clearInstanceCache()
Discard the instance cache.
|
protected void |
doStart()
Perform any marshaller-specific start activity.
|
protected void |
doWriteFields(SerializableClass info,
java.lang.Object obj) |
protected void |
doWriteObject(java.lang.Object orig,
boolean unshared)
Implementation of the actual object-writing method.
|
void |
finish()
Finish marshalling to a stream.
|
void |
flush() |
void |
start(ByteOutput byteOutput)
Begin marshalling to a stream.
|
close, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeObjectUnshared, writeShort, writeUTF
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeObjectUnshared
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
write, write, write
protected void doWriteObject(java.lang.Object orig, boolean unshared) throws java.io.IOException
AbstractMarshaller
doWriteObject
in class AbstractMarshaller
orig
- the object to writeunshared
- true
if the instance is unshared, false
if it is sharedjava.io.IOException
- if an I/O error occursprotected void doWriteFields(SerializableClass info, java.lang.Object obj) throws java.io.IOException
java.io.IOException
public void clearInstanceCache() throws java.io.IOException
Marshaller
clearInstanceCache
in interface Marshaller
java.io.IOException
- if an error occurspublic void clearClassCache() throws java.io.IOException
Marshaller
clearClassCache
in interface Marshaller
java.io.IOException
- if an error occurspublic void start(ByteOutput byteOutput) throws java.io.IOException
AbstractMarshaller
start
in interface Marshaller
start
in class AbstractMarshaller
byteOutput
- the new streamjava.io.IOException
- if an error occurs during setup, such as an error writing the headerprotected void doStart() throws java.io.IOException
AbstractMarshaller
doStart
in class AbstractMarshaller
java.io.IOException
- if I/O exception occurspublic void finish() throws java.io.IOException
AbstractMarshaller
Marshaller.start(ByteOutput)
method is again invoked.finish
in interface Marshaller
finish
in class AbstractMarshaller
java.io.IOException
- if an error occurspublic void flush() throws java.io.IOException
AbstractMarshaller
flush
in interface java.io.Flushable
flush
in interface java.io.ObjectOutput
flush
in class AbstractMarshaller
java.io.IOException