Added in API level 1

ObjectStreamConstants

public interface ObjectStreamConstants

java.io.ObjectStreamConstants


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

PROTOCOL_VERSION_1

Added in API level 1
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)

PROTOCOL_VERSION_2

Added in API level 1
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.

Constant Value: 2 (0x00000002)

SC_BLOCK_DATA

Added in API level 1
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.

See also:

Constant Value: 8 (0x00000008)

SC_ENUM

Added in API level 1
public static final byte SC_ENUM

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

Constant Value: 16 (0x00000010)

SC_EXTERNALIZABLE

Added in API level 1
public static final byte SC_EXTERNALIZABLE

Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.

Constant Value: 4 (0x00000004)

SC_SERIALIZABLE

Added in API level 1
public static final byte SC_SERIALIZABLE

Bit mask for ObjectStreamClass flag. Indicates class is Serializable.

Constant Value: 2 (0x00000002)

SC_WRITE_METHOD

Added in API level 1
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)

STREAM_MAGIC

Added in API level 1
public static final short STREAM_MAGIC

Magic number that is written to the stream header.

Constant Value: -21267 (0xffffaced)

STREAM_VERSION

Added in API level 1
public static final short STREAM_VERSION

Version number that is written to the stream header.

Constant Value: 5 (0x00000005)

TC_ARRAY

Added in API level 1
public static final byte TC_ARRAY

new Array.

Constant Value: 117 (0x00000075)

TC_BASE

Added in API level 1
public static final byte TC_BASE

First tag value.

Constant Value: 112 (0x00000070)

TC_BLOCKDATA

Added in API level 1
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)

TC_BLOCKDATALONG

Added in API level 1
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)

TC_CLASS

Added in API level 1
public static final byte TC_CLASS

Reference to Class.

Constant Value: 118 (0x00000076)

TC_CLASSDESC

Added in API level 1
public static final byte TC_CLASSDESC

new Class Descriptor.

Constant Value: 114 (0x00000072)

TC_ENDBLOCKDATA

Added in API level 1
public static final byte TC_ENDBLOCKDATA

End of optional block data blocks for an object.

Constant Value: 120 (0x00000078)

TC_ENUM

Added in API level 1
public static final byte TC_ENUM

new Enum constant.

Constant Value: 126 (0x0000007e)

TC_EXCEPTION

Added in API level 1
public static final byte TC_EXCEPTION

Exception during write.

Constant Value: 123 (0x0000007b)

TC_LONGSTRING

Added in API level 1
public static final byte TC_LONGSTRING

Long string.

Constant Value: 124 (0x0000007c)

TC_MAX

Added in API level 1
public static final byte TC_MAX

Last tag value.

Constant Value: 126 (0x0000007e)

TC_NULL

Added in API level 1
public static final byte TC_NULL

Null object reference.

Constant Value: 112 (0x00000070)

TC_OBJECT

Added in API level 1
public static final byte TC_OBJECT

new Object.

Constant Value: 115 (0x00000073)

TC_PROXYCLASSDESC

Added in API level 1
public static final byte TC_PROXYCLASSDESC

new Proxy Class Descriptor.

Constant Value: 125 (0x0000007d)

TC_REFERENCE

Added in API level 1
public static final byte TC_REFERENCE

Reference to an object already written into the stream.

Constant Value: 113 (0x00000071)

TC_RESET

Added in API level 1
public static final byte TC_RESET

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

Constant Value: 121 (0x00000079)

TC_STRING

Added in API level 1
public static final byte TC_STRING

new String.

Constant Value: 116 (0x00000074)

baseWireHandle

Added in API level 1
public static final int baseWireHandle

First wire handle to be assigned.

Constant Value: 8257536 (0x007e0000)

Fields

SUBCLASS_IMPLEMENTATION_PERMISSION

Added in API level 1
public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION

Enable overriding of readObject and writeObject.

SUBSTITUTION_PERMISSION

Added in API level 1
public static final SerializablePermission SUBSTITUTION_PERMISSION

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