Interface: java.io.ObjectStreamConstants

  • public interface ObjectStreamConstants
Constants written into the Object Serialization Stream.
Authors:
@author unascribed
Since:
@since JDK 1.1

Fields

  • PROTOCOL_VERSION_1

    public static final int PROTOCOL_VERSION_1 = 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.

  • PROTOCOL_VERSION_2

    public static final int PROTOCOL_VERSION_2 = 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 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 = 8
    Bit 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 = 16
    Bit mask for ObjectStreamClass flag. Indicates class is an enum type.
  • SC_EXTERNALIZABLE

    public static final byte SC_EXTERNALIZABLE = 4
    Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.
  • SC_SERIALIZABLE

    public static final byte SC_SERIALIZABLE = 2
    Bit mask for ObjectStreamClass flag. Indicates class is Serializable.
  • SC_WRITE_METHOD

    public static final byte SC_WRITE_METHOD = 1
    Bit mask for ObjectStreamClass flag. Indicates a Serializable class defines its own writeObject method.
  • STREAM_MAGIC

    public static final short STREAM_MAGIC = -21267
    Magic number that is written to the stream header.
  • STREAM_VERSION

    public static final short STREAM_VERSION = 5
    Version number that is written to the stream header.
  • SUBCLASS_IMPLEMENTATION_PERMISSION

    public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION
    Enable overriding of readObject and writeObject.
  • SUBSTITUTION_PERMISSION

    public static final SerializablePermission SUBSTITUTION_PERMISSION
    Enable substitution of one object for another during serialization/deserialization.
  • TC_ARRAY

    public static final byte TC_ARRAY = 117
    new Array.
  • TC_BASE

    public static final byte TC_BASE = 112
    First tag value.
  • TC_BLOCKDATA

    public static final byte TC_BLOCKDATA = 119
    Block of optional data. Byte following tag indicates number of bytes in this block data.
  • TC_BLOCKDATALONG

    public static final byte TC_BLOCKDATALONG = 122
    long Block data. The long following the tag indicates the number of bytes in this block data.
  • TC_CLASS

    public static final byte TC_CLASS = 118
    Reference to Class.
  • TC_CLASSDESC

    public static final byte TC_CLASSDESC = 114
    new Class Descriptor.
  • TC_ENDBLOCKDATA

    public static final byte TC_ENDBLOCKDATA = 120
    End of optional block data blocks for an object.
  • TC_ENUM

    public static final byte TC_ENUM = 126
    new Enum constant.
  • TC_EXCEPTION

    public static final byte TC_EXCEPTION = 123
    Exception during write.
  • TC_LONGSTRING

    public static final byte TC_LONGSTRING = 124
    Long string.
  • TC_MAX

    public static final byte TC_MAX = 126
    Last tag value.
  • TC_NULL

    public static final byte TC_NULL = 112
    Null object reference.
  • TC_OBJECT

    public static final byte TC_OBJECT = 115
    new Object.
  • TC_PROXYCLASSDESC

    public static final byte TC_PROXYCLASSDESC = 125
    new Proxy Class Descriptor.
  • TC_REFERENCE

    public static final byte TC_REFERENCE = 113
    Reference to an object already written into the stream.
  • TC_RESET

    public static final byte TC_RESET = 121
    Reset stream context. All handles written into stream are reset.
  • TC_STRING

    public static final byte TC_STRING = 116
    new String.
  • baseWireHandle

    public static final int baseWireHandle = 8257536
    First wire handle to be assigned.