java.io

Interface ObjectStreamConstants

public interface ObjectStreamConstants

This interface contains constants that are used in object serialization. This interface is used by ObjectOutputStream, ObjectInputStream, and ObjectStreamClass. The values for these constants are specified by the Java library specification.

Since: 1.1

Field Summary
intbaseWireHandle
The first handle that will be assigned to an object, for later references.
intPROTOCOL_VERSION_1
The serialization stream protocol version 1.
intPROTOCOL_VERSION_2
The serialization stream protocol version 2.
byteSC_BLOCK_DATA
Flag used in ObjectStreamClass to designate that externalizable data is written in block data mode.
byteSC_ENUM
Flag used in ObjectStreamClass to designate that the class is an enum constant.
byteSC_EXTERNALIZABLE
Flag used in ObjectStreamClass to designate that the class is externalizable.
byteSC_SERIALIZABLE
Flag used in ObjectStreamClass to designate that the class is serializeable.
byteSC_WRITE_METHOD
Flag used in ObjectStreamClass to designate that the class defines the writeObject method.
shortSTREAM_MAGIC
The magic number that is written as part of the stream header.
shortSTREAM_VERSION
The stream version number that is written as part of the stream header.
SerializablePermissionSUBCLASS_IMPLEMENTATION_PERMISSION
Constant for use with a SecurityManager to check if overriding of the writeObject and readObject methods is allowed.
SerializablePermissionSUBSTITUTION_PERMISSION
Constant for use with a SecurityManager to check if substitution of objects is allowed.
byteTC_ARRAY
Token value to designate a new array is next in the stream.
byteTC_BASE
The first token value.
byteTC_BLOCKDATA
Token value to designate a block of primitive data is next in the stream.
byteTC_BLOCKDATALONG
Token value to designate a long block of primitive data is next in the stream.
byteTC_CLASS
Token reference to designate a reference to a class.
byteTC_CLASSDESC
Token value to designate a class descriptor is next in the stream.
byteTC_ENDBLOCKDATA
Token value to designate the end of a block of primitve data.
byteTC_ENUM
Token value to designate an enum constant is next in the stream.
byteTC_EXCEPTION
Token value to designate an exception occured during serialization.
byteTC_LONGSTRING
Token value to designate a long string is next in the stream.
byteTC_MAX
The last token value.
byteTC_NULL
Token value to designate a null reference in the stream.
byteTC_OBJECT
Token value to designate a new object is next in the stream.
byteTC_PROXYCLASSDESC
Token value to designate a proxy class descriptor is next in the stream.
byteTC_REFERENCE
Token value to designate a reference to an already serialized object.
byteTC_RESET
Token value to designate a reset of the stream state.
byteTC_STRING
Token value to designate a new string is next in the stream.

Field Detail

baseWireHandle

public int baseWireHandle
The first handle that will be assigned to an object, for later references.

PROTOCOL_VERSION_1

public int PROTOCOL_VERSION_1
The serialization stream protocol version 1. This version was the default serialization protocol before JDK 1.2.

Since: 1.2

See Also: ObjectOutputStream

PROTOCOL_VERSION_2

public int PROTOCOL_VERSION_2
The serialization stream protocol version 2. This version is used as the default serialization protocol since JDK 1.2.

Since: 1.2

See Also: ObjectOutputStream

SC_BLOCK_DATA

public byte SC_BLOCK_DATA
Flag used in ObjectStreamClass to designate that externalizable data is written in block data mode.

Since: 1.2

SC_ENUM

public byte SC_ENUM
Flag used in ObjectStreamClass to designate that the class is an enum constant.

Since: 1.5

SC_EXTERNALIZABLE

public byte SC_EXTERNALIZABLE
Flag used in ObjectStreamClass to designate that the class is externalizable.

SC_SERIALIZABLE

public byte SC_SERIALIZABLE
Flag used in ObjectStreamClass to designate that the class is serializeable.

SC_WRITE_METHOD

public byte SC_WRITE_METHOD
Flag used in ObjectStreamClass to designate that the class defines the writeObject method.

STREAM_MAGIC

public short STREAM_MAGIC
The magic number that is written as part of the stream header.

STREAM_VERSION

public short STREAM_VERSION
The stream version number that is written as part of the stream header. Note that this is different from the protocol version that specifies the data format for the stream.

SUBCLASS_IMPLEMENTATION_PERMISSION

public SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION
Constant for use with a SecurityManager to check if overriding of the writeObject and readObject methods is allowed.

SUBSTITUTION_PERMISSION

public SerializablePermission SUBSTITUTION_PERMISSION
Constant for use with a SecurityManager to check if substitution of objects is allowed.

TC_ARRAY

public byte TC_ARRAY
Token value to designate a new array is next in the stream.

TC_BASE

public byte TC_BASE
The first token value.

TC_BLOCKDATA

public byte TC_BLOCKDATA
Token value to designate a block of primitive data is next in the stream. The next byte in the stream holds the size of the block (in bytes).

TC_BLOCKDATALONG

public byte TC_BLOCKDATALONG
Token value to designate a long block of primitive data is next in the stream. The next long in the stream holds the size of the block (in bytes).

TC_CLASS

public byte TC_CLASS
Token reference to designate a reference to a class.

TC_CLASSDESC

public byte TC_CLASSDESC
Token value to designate a class descriptor is next in the stream.

TC_ENDBLOCKDATA

public byte TC_ENDBLOCKDATA
Token value to designate the end of a block of primitve data.

TC_ENUM

public byte TC_ENUM
Token value to designate an enum constant is next in the stream.

Since: 1.5

TC_EXCEPTION

public byte TC_EXCEPTION
Token value to designate an exception occured during serialization.

TC_LONGSTRING

public byte TC_LONGSTRING
Token value to designate a long string is next in the stream.

TC_MAX

public byte TC_MAX
The last token value.

TC_NULL

public byte TC_NULL
Token value to designate a null reference in the stream.

TC_OBJECT

public byte TC_OBJECT
Token value to designate a new object is next in the stream.

TC_PROXYCLASSDESC

public byte TC_PROXYCLASSDESC
Token value to designate a proxy class descriptor is next in the stream.

TC_REFERENCE

public byte TC_REFERENCE
Token value to designate a reference to an already serialized object.

TC_RESET

public byte TC_RESET
Token value to designate a reset of the stream state.

TC_STRING

public byte TC_STRING
Token value to designate a new string is next in the stream.