Top Description Fields
java.io

public Interface ObjectStreamConstants

Known Direct Implementers
java.io.ObjectInputStream, java.io.ObjectOutputStream

Constants written into the Object Serialization Stream.
Since
1.1

Field Summary

Modifier and TypeField and Description
public static final int
baseWireHandle

First wire handle to be assigned.

public static final int
PROTOCOL_VERSION_1

A Stream Protocol Version.

public static final int
PROTOCOL_VERSION_2

A Stream Protocol Version.

public static final byte
SC_BLOCK_DATA

Bit mask for ObjectStreamClass flag.

public static final byte
SC_ENUM

Bit mask for ObjectStreamClass flag.

public static final byte
SC_EXTERNALIZABLE

Bit mask for ObjectStreamClass flag.

public static final byte
SC_SERIALIZABLE

Bit mask for ObjectStreamClass flag.

public static final byte
SC_WRITE_METHOD

Bit mask for ObjectStreamClass flag.

public static final SerializablePermission
SERIAL_FILTER_PERMISSION

Enable setting the system-wide serial filter.

public static final short
STREAM_MAGIC

Magic number that is written to the stream header.

public static final short
STREAM_VERSION

Version number that is written to the stream header.

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.

public static final byte
TC_ARRAY

new Array.

public static final byte
TC_BASE

First tag value.

public static final byte
TC_BLOCKDATA

Block of optional data.

public static final byte
TC_BLOCKDATALONG

long Block data.

public static final byte
TC_CLASS

Reference to Class.

public static final byte
TC_CLASSDESC

new Class Descriptor.

public static final byte
TC_ENDBLOCKDATA

End of optional block data blocks for an object.

public static final byte
TC_ENUM

new Enum constant.

public static final byte
TC_EXCEPTION

Exception during write.

public static final byte
TC_LONGSTRING

Long string.

public static final byte
TC_MAX

Last tag value.

public static final byte
TC_NULL

Null object reference.

public static final byte
TC_OBJECT

new Object.

public static final byte
TC_PROXYCLASSDESC

new Proxy Class Descriptor.

public static final byte
TC_REFERENCE

Reference to an object already written into the stream.

public static final byte
TC_RESET

Reset stream context.

public static final byte
TC_STRING

new String.

Field Detail

baseWireHandleback to summary
public static final int baseWireHandle

First wire handle to be assigned.

PROTOCOL_VERSION_1back to summary
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.

Since
1.2
See Also
java.io.ObjectOutputStream#useProtocolVersion(int)
PROTOCOL_VERSION_2back to summary
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 class descriptor 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.

Since
1.2
See Also
java.io.ObjectOutputStream#useProtocolVersion(int), SC_BLOCK_DATA
SC_BLOCK_DATAback to summary
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.

Since
1.2
See Also
PROTOCOL_VERSION_2
SC_ENUMback to summary
public static final byte SC_ENUM

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

Since
1.5
SC_EXTERNALIZABLEback to summary
public static final byte SC_EXTERNALIZABLE

Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.

SC_SERIALIZABLEback to summary
public static final byte SC_SERIALIZABLE

Bit mask for ObjectStreamClass flag. Indicates class is Serializable.

SC_WRITE_METHODback to summary
public static final byte SC_WRITE_METHOD

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

SERIAL_FILTER_PERMISSIONback to summary
public static final SerializablePermission SERIAL_FILTER_PERMISSION

Enable setting the system-wide serial filter.

Since
9
See Also
java.io.ObjectInputFilter.Config#setSerialFilter(ObjectInputFilter)
STREAM_MAGICback to summary
public static final short STREAM_MAGIC

Magic number that is written to the stream header.

STREAM_VERSIONback to summary
public static final short STREAM_VERSION

Version number that is written to the stream header.

SUBCLASS_IMPLEMENTATION_PERMISSIONback to summary
public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION

Enable overriding of readObject and writeObject.

Since
1.2
See Also
java.io.ObjectOutputStream#writeObjectOverride(Object), java.io.ObjectInputStream#readObjectOverride()
SUBSTITUTION_PERMISSIONback to summary
public static final SerializablePermission SUBSTITUTION_PERMISSION

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

Since
1.2
See Also
java.io.ObjectOutputStream#enableReplaceObject(boolean), java.io.ObjectInputStream#enableResolveObject(boolean)
TC_ARRAYback to summary
public static final byte TC_ARRAY

new Array.

TC_BASEback to summary
public static final byte TC_BASE

First tag value.

TC_BLOCKDATAback to summary
public static final byte TC_BLOCKDATA

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

TC_BLOCKDATALONGback to summary
public static final byte TC_BLOCKDATALONG

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

TC_CLASSback to summary
public static final byte TC_CLASS

Reference to Class.

TC_CLASSDESCback to summary
public static final byte TC_CLASSDESC

new Class Descriptor.

TC_ENDBLOCKDATAback to summary
public static final byte TC_ENDBLOCKDATA

End of optional block data blocks for an object.

TC_ENUMback to summary
public static final byte TC_ENUM

new Enum constant.

Since
1.5
TC_EXCEPTIONback to summary
public static final byte TC_EXCEPTION

Exception during write.

TC_LONGSTRINGback to summary
public static final byte TC_LONGSTRING

Long string.

TC_MAXback to summary
public static final byte TC_MAX

Last tag value.

TC_NULLback to summary
public static final byte TC_NULL

Null object reference.

TC_OBJECTback to summary
public static final byte TC_OBJECT

new Object.

TC_PROXYCLASSDESCback to summary
public static final byte TC_PROXYCLASSDESC

new Proxy Class Descriptor.

TC_REFERENCEback to summary
public static final byte TC_REFERENCE

Reference to an object already written into the stream.

TC_RESETback to summary
public static final byte TC_RESET

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

TC_STRINGback to summary
public static final byte TC_STRING

new String.