- All Known Implementing Classes:
ObjectInputStream
,ObjectOutputStream
public interface ObjectStreamConstants
Constants written into the Object Serialization Stream.
- Since:
- 1.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
First wire handle to be assigned.static int
A Stream Protocol Version.static int
A Stream Protocol Version.static byte
Bit mask for ObjectStreamClass flag.static byte
Bit mask for ObjectStreamClass flag.static byte
Bit mask for ObjectStreamClass flag.static byte
Bit mask for ObjectStreamClass flag.static byte
Bit mask for ObjectStreamClass flag.static SerializablePermission
Enable setting the system-wide serial filter.static short
Magic number that is written to the stream header.static short
Version number that is written to the stream header.static SerializablePermission
Enable overriding of readObject and writeObject.static SerializablePermission
Enable substitution of one object for another during serialization/deserialization.static byte
new Array.static byte
First tag value.static byte
Block of optional data.static byte
long Block data.static byte
Reference to Class.static byte
new Class Descriptor.static byte
End of optional block data blocks for an object.static byte
new Enum constant.static byte
Exception during write.static byte
Long string.static byte
Last tag value.static byte
Null object reference.static byte
new Object.static byte
new Proxy Class Descriptor.static byte
Reference to an object already written into the stream.static byte
Reset stream context.static byte
new String.
-
Field Details
-
STREAM_MAGIC
static final short STREAM_MAGICMagic number that is written to the stream header.- See Also:
- Constant Field Values
-
STREAM_VERSION
static final short STREAM_VERSIONVersion number that is written to the stream header.- See Also:
- Constant Field Values
-
TC_BASE
static final byte TC_BASEFirst tag value.- See Also:
- Constant Field Values
-
TC_NULL
static final byte TC_NULLNull object reference.- See Also:
- Constant Field Values
-
TC_REFERENCE
static final byte TC_REFERENCEReference to an object already written into the stream.- See Also:
- Constant Field Values
-
TC_CLASSDESC
static final byte TC_CLASSDESCnew Class Descriptor.- See Also:
- Constant Field Values
-
TC_OBJECT
static final byte TC_OBJECTnew Object.- See Also:
- Constant Field Values
-
TC_STRING
static final byte TC_STRINGnew String.- See Also:
- Constant Field Values
-
TC_ARRAY
static final byte TC_ARRAYnew Array.- See Also:
- Constant Field Values
-
TC_CLASS
static final byte TC_CLASSReference to Class.- See Also:
- Constant Field Values
-
TC_BLOCKDATA
static final byte TC_BLOCKDATABlock of optional data. Byte following tag indicates number of bytes in this block data.- See Also:
- Constant Field Values
-
TC_ENDBLOCKDATA
static final byte TC_ENDBLOCKDATAEnd of optional block data blocks for an object.- See Also:
- Constant Field Values
-
TC_RESET
static final byte TC_RESETReset stream context. All handles written into stream are reset.- See Also:
- Constant Field Values
-
TC_BLOCKDATALONG
static final byte TC_BLOCKDATALONGlong Block data. The long following the tag indicates the number of bytes in this block data.- See Also:
- Constant Field Values
-
TC_EXCEPTION
static final byte TC_EXCEPTIONException during write.- See Also:
- Constant Field Values
-
TC_LONGSTRING
static final byte TC_LONGSTRINGLong string.- See Also:
- Constant Field Values
-
TC_PROXYCLASSDESC
static final byte TC_PROXYCLASSDESCnew Proxy Class Descriptor.- See Also:
- Constant Field Values
-
TC_ENUM
static final byte TC_ENUMnew Enum constant.- Since:
- 1.5
- See Also:
- Constant Field Values
-
TC_MAX
static final byte TC_MAXLast tag value.- See Also:
- Constant Field Values
-
baseWireHandle
static final int baseWireHandleFirst wire handle to be assigned.- See Also:
- Constant Field Values
-
SC_WRITE_METHOD
static final byte SC_WRITE_METHODBit mask for ObjectStreamClass flag. Indicates a Serializable class defines its own writeObject method.- See Also:
- Constant Field Values
-
SC_BLOCK_DATA
static final byte SC_BLOCK_DATABit mask for ObjectStreamClass flag. Indicates Externalizable data written in Block Data mode. Added for PROTOCOL_VERSION_2.- Since:
- 1.2
- See Also:
PROTOCOL_VERSION_2
, Constant Field Values
-
SC_SERIALIZABLE
static final byte SC_SERIALIZABLEBit mask for ObjectStreamClass flag. Indicates class is Serializable.- See Also:
- Constant Field Values
-
SC_EXTERNALIZABLE
static final byte SC_EXTERNALIZABLEBit mask for ObjectStreamClass flag. Indicates class is Externalizable.- See Also:
- Constant Field Values
-
SC_ENUM
static final byte SC_ENUMBit mask for ObjectStreamClass flag. Indicates class is an enum type.- Since:
- 1.5
- See Also:
- Constant Field Values
-
SUBSTITUTION_PERMISSION
Enable substitution of one object for another during serialization/deserialization. -
SUBCLASS_IMPLEMENTATION_PERMISSION
Enable overriding of readObject and writeObject.- Since:
- 1.2
- See Also:
ObjectOutputStream.writeObjectOverride(Object)
,ObjectInputStream.readObjectOverride()
-
SERIAL_FILTER_PERMISSION
Enable setting the system-wide serial filter.- Since:
- 9
- See Also:
ObjectInputFilter.Config.setSerialFilter(ObjectInputFilter)
-
PROTOCOL_VERSION_1
static final int PROTOCOL_VERSION_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.
- Since:
- 1.2
- See Also:
ObjectOutputStream.useProtocolVersion(int)
, Constant Field Values
-
PROTOCOL_VERSION_2
static final int PROTOCOL_VERSION_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 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.
- Since:
- 1.2
- See Also:
ObjectOutputStream.useProtocolVersion(int)
,SC_BLOCK_DATA
, Constant Field Values
-