public interface

ObjectStreamConstants

java.io.ObjectStreamConstants
Known Indirect Subclasses

Class Overview

Constants written into the Object Serialization Stream.

Summary

Constants
int PROTOCOL_VERSION_1 A Stream Protocol Version.
int PROTOCOL_VERSION_2 A Stream Protocol Version.
byte SC_BLOCK_DATA Bit mask for ObjectStreamClass flag.
byte SC_ENUM Bit mask for ObjectStreamClass flag.
byte SC_EXTERNALIZABLE Bit mask for ObjectStreamClass flag.
byte SC_SERIALIZABLE Bit mask for ObjectStreamClass flag.
byte SC_WRITE_METHOD Bit mask for ObjectStreamClass flag.
short STREAM_MAGIC Magic number that is written to the stream header.
short STREAM_VERSION Version number that is written to the stream header.
byte TC_ARRAY new Array.
byte TC_BASE First tag value.
byte TC_BLOCKDATA Block of optional data.
byte TC_BLOCKDATALONG long Block data.
byte TC_CLASS Reference to Class.
byte TC_CLASSDESC new Class Descriptor.
byte TC_ENDBLOCKDATA End of optional block data blocks for an object.
byte TC_ENUM new Enum constant.
byte TC_EXCEPTION Exception during write.
byte TC_LONGSTRING Long string.
byte TC_MAX Last tag value.
byte TC_NULL Null object reference.
byte TC_OBJECT new Object.
byte TC_PROXYCLASSDESC new Proxy Class Descriptor.
byte TC_REFERENCE Reference to an object already written into the stream.
byte TC_RESET Reset stream context.
byte TC_STRING new String.
int baseWireHandle First wire handle to be assigned.
Fields
public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION Enable overriding of readObject and writeObject.
public static final SerializablePermission SUBSTITUTION_PERMISSION Enable substitution of one object for another during serialization/deserialization.

Constants

public static final int PROTOCOL_VERSION_1

A Stream Protocol Version.

All externalizable data is written in JDK 1.1 external data format after calling this method. This version is needed to write streams containing Externalizable data that can be read by pre-JDK 1.1.6 JVMs.

Constant Value: 1 (0x00000001)

public static final int PROTOCOL_VERSION_2

A Stream Protocol Version.

This protocol is written by JVM 1.2. Externalizable data is written in block data mode and is terminated with TC_ENDBLOCKDATA. Externalizable classdescriptor flags has SC_BLOCK_DATA enabled. JVM 1.1.6 and greater can read this format change. Enables writing a nonSerializable class descriptor into the stream. The serialVersionUID of a nonSerializable class is set to 0L.

Constant Value: 2 (0x00000002)

public static final byte SC_BLOCK_DATA

Bit mask for ObjectStreamClass flag. Indicates Externalizable data written in Block Data mode. Added for PROTOCOL_VERSION_2.

Constant Value: 8 (0x00000008)

public static final byte SC_ENUM

Bit mask for ObjectStreamClass flag. Indicates class is an enum type.

Constant Value: 16 (0x00000010)

public static final byte SC_EXTERNALIZABLE

Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.

Constant Value: 4 (0x00000004)

public static final byte SC_SERIALIZABLE

Bit mask for ObjectStreamClass flag. Indicates class is Serializable.

Constant Value: 2 (0x00000002)

public static final byte SC_WRITE_METHOD

Bit mask for ObjectStreamClass flag. Indicates a Serializable class defines its own writeObject method.

Constant Value: 1 (0x00000001)

public static final short STREAM_MAGIC

Magic number that is written to the stream header.

Constant Value: -21267 (0xffffaced)

public static final short STREAM_VERSION

Version number that is written to the stream header.

Constant Value: 5 (0x00000005)

public static final byte TC_ARRAY

new Array.

Constant Value: 117 (0x00000075)

public static final byte TC_BASE

First tag value.

Constant Value: 112 (0x00000070)

public static final byte TC_BLOCKDATA

Block of optional data. Byte following tag indicates number of bytes in this block data.

Constant Value: 119 (0x00000077)

public static final byte TC_BLOCKDATALONG

long Block data. The long following the tag indicates the number of bytes in this block data.

Constant Value: 122 (0x0000007a)

public static final byte TC_CLASS

Reference to Class.

Constant Value: 118 (0x00000076)

public static final byte TC_CLASSDESC

new Class Descriptor.

Constant Value: 114 (0x00000072)

public static final byte TC_ENDBLOCKDATA

End of optional block data blocks for an object.

Constant Value: 120 (0x00000078)

public static final byte TC_ENUM

new Enum constant.

Constant Value: 126 (0x0000007e)

public static final byte TC_EXCEPTION

Exception during write.

Constant Value: 123 (0x0000007b)

public static final byte TC_LONGSTRING

Long string.

Constant Value: 124 (0x0000007c)

public static final byte TC_MAX

Last tag value.

Constant Value: 126 (0x0000007e)

public static final byte TC_NULL

Null object reference.

Constant Value: 112 (0x00000070)

public static final byte TC_OBJECT

new Object.

Constant Value: 115 (0x00000073)

public static final byte TC_PROXYCLASSDESC

new Proxy Class Descriptor.

Constant Value: 125 (0x0000007d)

public static final byte TC_REFERENCE

Reference to an object already written into the stream.

Constant Value: 113 (0x00000071)

public static final byte TC_RESET

Reset stream context. All handles written into stream are reset.

Constant Value: 121 (0x00000079)

public static final byte TC_STRING

new String.

Constant Value: 116 (0x00000074)

public static final int baseWireHandle

First wire handle to be assigned.

Constant Value: 8257536 (0x007e0000)

Fields

public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION

Enable overriding of readObject and writeObject.

public static final SerializablePermission SUBSTITUTION_PERMISSION

Enable substitution of one object for another during serialization/deserialization.