Top Fields Constructors Methods
io.netty.handler.codec.serialization

pack-priv Class CompactObjectOutputStream

extends ObjectOutputStream
Class Inheritance
Imports
java.io.IOException, .ObjectOutputStream, .ObjectStreamClass, .OutputStream

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
writeClassDescriptor(ObjectStreamClass
class descriptor to write to the stream
desc
)

Overrides java.io.ObjectOutputStream.writeClassDescriptor.

Write the specified class descriptor to the ObjectOutputStream.
protected void
writeStreamHeader()

Overrides java.io.ObjectOutputStream.writeStreamHeader.

The writeStreamHeader method is provided so subclasses can append or prepend their own header to the stream.
Inherited from java.io.ObjectOutputStream:
annotateClassannotateProxyClassclosedefaultWriteObjectdrainenableReplaceObjectflushputFieldsreplaceObjectresetuseProtocolVersionwritewritewritewriteBooleanwriteBytewriteByteswriteCharwriteCharswriteDoublewriteFieldswriteFloatwriteIntwriteLongwriteObjectwriteObjectOverridewriteShortwriteUnsharedwriteUTF

Field Detail

TYPE_FAT_DESCRIPTORback to summary
pack-priv static final int TYPE_FAT_DESCRIPTOR
TYPE_THIN_DESCRIPTORback to summary
pack-priv static final int TYPE_THIN_DESCRIPTOR

Constructor Detail

CompactObjectOutputStreamback to summary
pack-priv CompactObjectOutputStream(OutputStream out) throws IOException

Method Detail

writeClassDescriptorback to summary
protected void writeClassDescriptor(ObjectStreamClass desc) throws IOException

Overrides java.io.ObjectOutputStream.writeClassDescriptor.

Doc from java.io.ObjectOutputStream.writeClassDescriptor.

Write the specified class descriptor to the ObjectOutputStream. Class descriptors are used to identify the classes of objects written to the stream. Subclasses of ObjectOutputStream may override this method to customize the way in which class descriptors are written to the serialization stream. The corresponding method in ObjectInputStream, readClassDescriptor, should then be overridden to reconstitute the class descriptor from its custom stream representation. By default, this method writes class descriptors according to the format defined in the Java Object Serialization Specification.

Note that this method will only be called if the ObjectOutputStream is not using the old serialization stream format (set by calling ObjectOutputStream's useProtocolVersion method). If this serialization stream is using the old format (PROTOCOL_VERSION_1), the class descriptor will be written internally in a manner that cannot be overridden or customized.

Parameters
desc:ObjectStreamClass

class descriptor to write to the stream

Annotations
@Override
Exceptions
IOException:
If an I/O error has occurred.
writeStreamHeaderback to summary
protected void writeStreamHeader() throws IOException

Overrides java.io.ObjectOutputStream.writeStreamHeader.

Doc from java.io.ObjectOutputStream.writeStreamHeader.

The writeStreamHeader method is provided so subclasses can append or prepend their own header to the stream. It writes the magic number and version to the stream.

Annotations
@Override
Exceptions
IOException:
if I/O errors occur while writing to the underlying stream