java.io
Interface ObjectStreamConstants

All Known Implementing Classes:
ObjectInputStream, ObjectOutputStream

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
static int baseWireHandle
          The first handle that will be assigned to an object, for later references.
static int PROTOCOL_VERSION_1
          The serialization stream protocol version 1.
static int PROTOCOL_VERSION_2
          The serialization stream protocol version 2.
static byte SC_BLOCK_DATA
          Flag used in ObjectStreamClass to designate that externalizable data is written in block data mode.
static byte SC_ENUM
          Flag used in ObjectStreamClass to designate that the class is an enum constant.
static byte SC_EXTERNALIZABLE
          Flag used in ObjectStreamClass to designate that the class is externalizable.
static byte SC_SERIALIZABLE
          Flag used in ObjectStreamClass to designate that the class is serializeable.
static byte SC_WRITE_METHOD
          Flag used in ObjectStreamClass to designate that the class defines the writeObject method.
static short STREAM_MAGIC
          The magic number that is written as part of the stream header.
static short STREAM_VERSION
          The stream version number that is written as part of the stream header.
static SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION
          Constant for use with a SecurityManager to check if overriding of the writeObject and readObject methods is allowed.
static SerializablePermission SUBSTITUTION_PERMISSION
          Constant for use with a SecurityManager to check if substitution of objects is allowed.
static byte TC_ARRAY
          Token value to designate a new array is next in the stream.
static byte TC_BASE
          The first token value.
static byte TC_BLOCKDATA
          Token value to designate a block of primitive data is next in the stream.
static byte TC_BLOCKDATALONG
          Token value to designate a long block of primitive data is next in the stream.
static byte TC_CLASS
          Token reference to designate a reference to a class.
static byte TC_CLASSDESC
          Token value to designate a class descriptor is next in the stream.
static byte TC_ENDBLOCKDATA
          Token value to designate the end of a block of primitve data.
static byte TC_ENUM
          Token value to designate an enum constant is next in the stream.
static byte TC_EXCEPTION
          Token value to designate an exception occured during serialization.
static byte TC_LONGSTRING
          Token value to designate a long string is next in the stream.
static byte TC_MAX
          The last token value.
static byte TC_NULL
          Token value to designate a null reference in the stream.
static byte TC_OBJECT
          Token value to designate a new object is next in the stream.
static byte TC_PROXYCLASSDESC
          Token value to designate a proxy class descriptor is next in the stream.
static byte TC_REFERENCE
          Token value to designate a reference to an already serialized object.
static byte TC_RESET
          Token value to designate a reset of the stream state.
static byte TC_STRING
          Token value to designate a new string is next in the stream.
 

Field Detail

PROTOCOL_VERSION_1

static final 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.useProtocolVersion(int), Constant Field Values

PROTOCOL_VERSION_2

static final 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.useProtocolVersion(int), Constant Field Values

STREAM_MAGIC

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

See Also:
Constant Field Values

STREAM_VERSION

static final 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.

See Also:
Constant Field Values

TC_NULL

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

See Also:
Constant Field Values

TC_REFERENCE

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

See Also:
Constant Field Values

TC_CLASSDESC

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

See Also:
Constant Field Values

TC_OBJECT

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

See Also:
Constant Field Values

TC_STRING

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

See Also:
Constant Field Values

TC_ARRAY

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

See Also:
Constant Field Values

TC_CLASS

static final byte TC_CLASS
Token reference to designate a reference to a class.

See Also:
Constant Field Values

TC_BLOCKDATA

static final 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).

See Also:
Constant Field Values

TC_ENDBLOCKDATA

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

See Also:
Constant Field Values

TC_RESET

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

See Also:
Constant Field Values

TC_BLOCKDATALONG

static final 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).

See Also:
Constant Field Values

TC_EXCEPTION

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

See Also:
Constant Field Values

TC_LONGSTRING

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

See Also:
Constant Field Values

TC_PROXYCLASSDESC

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

See Also:
Constant Field Values

TC_ENUM

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

Since:
1.5
See Also:
Constant Field Values

TC_BASE

static final byte TC_BASE
The first token value.

See Also:
Constant Field Values

TC_MAX

static final byte TC_MAX
The last token value.

See Also:
Constant Field Values

baseWireHandle

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

See Also:
Constant Field Values

SC_WRITE_METHOD

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

See Also:
Constant Field Values

SC_SERIALIZABLE

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

See Also:
Constant Field Values

SC_EXTERNALIZABLE

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

See Also:
Constant Field Values

SC_BLOCK_DATA

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

Since:
1.2
See Also:
Constant Field Values

SC_ENUM

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

Since:
1.5
See Also:
Constant Field Values

SUBSTITUTION_PERMISSION

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


SUBCLASS_IMPLEMENTATION_PERMISSION

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