Interface: java.io.ObjectStreamConstants
- public interface ObjectStreamConstants
Constants written into the Object Serialization Stream.
Fields
-
PROTOCOL_VERSION_1
public static final int PROTOCOL_VERSION_1 = 1A 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.
-
PROTOCOL_VERSION_2
public static final int PROTOCOL_VERSION_2 = 2A 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.
-
SC_BLOCK_DATA
public static final byte SC_BLOCK_DATA = 8Bit mask for ObjectStreamClass flag. Indicates Externalizable data written in Block Data mode. Added for PROTOCOL_VERSION_2. -
SC_ENUM
public static final byte SC_ENUM = 16Bit mask for ObjectStreamClass flag. Indicates class is an enum type. -
SC_EXTERNALIZABLE
public static final byte SC_EXTERNALIZABLE = 4Bit mask for ObjectStreamClass flag. Indicates class is Externalizable. -
SC_SERIALIZABLE
public static final byte SC_SERIALIZABLE = 2Bit mask for ObjectStreamClass flag. Indicates class is Serializable. -
SC_WRITE_METHOD
public static final byte SC_WRITE_METHOD = 1Bit mask for ObjectStreamClass flag. Indicates a Serializable class defines its own writeObject method. -
STREAM_MAGIC
public static final short STREAM_MAGIC = -21267Magic number that is written to the stream header. -
STREAM_VERSION
public static final short STREAM_VERSION = 5Version number that is written to the stream header. -
SUBCLASS_IMPLEMENTATION_PERMISSION
public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSIONEnable overriding of readObject and writeObject. -
SUBSTITUTION_PERMISSION
public static final SerializablePermission SUBSTITUTION_PERMISSIONEnable substitution of one object for another during serialization/deserialization. -
TC_ARRAY
public static final byte TC_ARRAY = 117new Array. -
TC_BASE
public static final byte TC_BASE = 112First tag value. -
TC_BLOCKDATA
public static final byte TC_BLOCKDATA = 119Block of optional data. Byte following tag indicates number of bytes in this block data. -
TC_BLOCKDATALONG
public static final byte TC_BLOCKDATALONG = 122long Block data. The long following the tag indicates the number of bytes in this block data. -
TC_CLASS
public static final byte TC_CLASS = 118Reference to Class. -
TC_CLASSDESC
public static final byte TC_CLASSDESC = 114new Class Descriptor. -
TC_ENDBLOCKDATA
public static final byte TC_ENDBLOCKDATA = 120End of optional block data blocks for an object. -
TC_ENUM
public static final byte TC_ENUM = 126new Enum constant. -
TC_EXCEPTION
public static final byte TC_EXCEPTION = 123Exception during write. -
TC_LONGSTRING
public static final byte TC_LONGSTRING = 124Long string. -
TC_MAX
public static final byte TC_MAX = 126Last tag value. -
TC_NULL
public static final byte TC_NULL = 112Null object reference. -
TC_OBJECT
public static final byte TC_OBJECT = 115new Object. -
TC_PROXYCLASSDESC
public static final byte TC_PROXYCLASSDESC = 125new Proxy Class Descriptor. -
TC_REFERENCE
public static final byte TC_REFERENCE = 113Reference to an object already written into the stream. -
TC_RESET
public static final byte TC_RESET = 121Reset stream context. All handles written into stream are reset. -
TC_STRING
public static final byte TC_STRING = 116new String. -
baseWireHandle
public static final int baseWireHandle = 8257536First wire handle to be assigned.
