# ObjectStreamConstants

public interface **ObjectStreamConstants**

|---|---|---|
| Known Indirect Subclasses [ObjectInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectInputStream.html), [ObjectOutputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectOutputStream.html) |---|---| | [ObjectInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectInputStream.html) | An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream. | | [ObjectOutputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectOutputStream.html) | An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream. | |||

A helper interface with constants used by the serialization implementation.

### Constant Summary

|---|---|---|
| int | [PROTOCOL_VERSION_1](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#PROTOCOL_VERSION_1) | Stream protocol version 1. |
| int | [PROTOCOL_VERSION_2](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#PROTOCOL_VERSION_2) | Stream protocol version 2. |
| byte | [SC_BLOCK_DATA](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SC_BLOCK_DATA) | Bit mask for the `flag` field in ObjectStreamClass. |
| byte | [SC_ENUM](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SC_ENUM) | Bit mask for the `flag` field in ObjectStreamClass. |
| byte | [SC_EXTERNALIZABLE](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SC_EXTERNALIZABLE) | Bit mask for the `flag` field in ObjectStreamClass. |
| byte | [SC_SERIALIZABLE](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SC_SERIALIZABLE) | Bit mask for the `flag` field in ObjectStreamClass. |
| byte | [SC_WRITE_METHOD](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SC_WRITE_METHOD) | Bit mask for the `flag` field in ObjectStreamClass. |
| short | [STREAM_MAGIC](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#STREAM_MAGIC) | The stream header's magic number. |
| short | [STREAM_VERSION](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#STREAM_VERSION) | The stream header's version number. |
| byte | [TC_ARRAY](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_ARRAY) | Tag to mark a new array. |
| byte | [TC_BASE](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_BASE) | The minimum tag value. |
| byte | [TC_BLOCKDATA](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_BLOCKDATA) | Tag to mark a block of optional data. |
| byte | [TC_BLOCKDATALONG](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_BLOCKDATALONG) | Tag to mark a long block of data. |
| byte | [TC_CLASS](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_CLASS) | Tag to mark a reference to a class. |
| byte | [TC_CLASSDESC](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_CLASSDESC) | Tag to mark a new class descriptor. |
| byte | [TC_ENDBLOCKDATA](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_ENDBLOCKDATA) | Tag to mark the end of block data blocks for an object. |
| byte | [TC_ENUM](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_ENUM) | Tag to mark a new enum. |
| byte | [TC_EXCEPTION](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_EXCEPTION) | Tag to mark an exception. |
| byte | [TC_LONGSTRING](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_LONGSTRING) | Tag to mark a long string. |
| byte | [TC_MAX](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_MAX) | The maximum tag value. |
| byte | [TC_NULL](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_NULL) | Tag to mark a `null` object reference. |
| byte | [TC_OBJECT](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_OBJECT) | Tag to mark a new object. |
| byte | [TC_PROXYCLASSDESC](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_PROXYCLASSDESC) | Tag to mark a new proxy class descriptor. |
| byte | [TC_REFERENCE](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_REFERENCE) | Tag to mark a reference to an object that has already been written to the stream. |
| byte | [TC_RESET](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_RESET) | Tag to mark a stream reset. |
| byte | [TC_STRING](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#TC_STRING) | Tag to mark a new string. |
| int | [baseWireHandle](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#baseWireHandle) | Handle for the first object that gets serialized. |

### Field Summary

|---|---|---|
| public static final [SerializablePermission](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/SerializablePermission.html) | [SUBCLASS_IMPLEMENTATION_PERMISSION](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SUBCLASS_IMPLEMENTATION_PERMISSION) | Permission constant to enable subclassing of ObjectInputStream and ObjectOutputStream. |
| public static final [SerializablePermission](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/SerializablePermission.html) | [SUBSTITUTION_PERMISSION](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/ObjectStreamConstants.html#SUBSTITUTION_PERMISSION) | Permission constant to enable object substitution during serialization and deserialization. |

## Constants

#### public static final int
**PROTOCOL_VERSION_1**

Stream protocol version 1.
Constant Value: 1

#### public static final int
**PROTOCOL_VERSION_2**

Stream protocol version 2.
Constant Value: 2

#### public static final byte
**SC_BLOCK_DATA**

Bit mask for the `flag` field in ObjectStreamClass. Indicates
that an externalizable class is written in block data mode.
Constant Value: 8

#### public static final byte
**SC_ENUM**

Bit mask for the `flag` field in ObjectStreamClass. Indicates
that a class is an enum type.
Constant Value: 16

#### public static final byte
**SC_EXTERNALIZABLE**

Bit mask for the `flag` field in ObjectStreamClass. Indicates
that a class is externalizable.
Constant Value: 4

#### public static final byte
**SC_SERIALIZABLE**

Bit mask for the `flag` field in ObjectStreamClass. Indicates
that a class is serializable.
Constant Value: 2

#### public static final byte
**SC_WRITE_METHOD**

Bit mask for the `flag` field in ObjectStreamClass. Indicates
that a serializable class has its own `writeObject` method.
Constant Value: 1

#### public static final short
**STREAM_MAGIC**

The stream header's magic number.
Constant Value: -21267

#### public static final short
**STREAM_VERSION**

The stream header's version number.
Constant Value: 5

#### public static final byte
**TC_ARRAY**

Tag to mark a new array.
Constant Value: 117

#### public static final byte
**TC_BASE**

The minimum tag value.
Constant Value: 112

#### public static final byte
**TC_BLOCKDATA**

Tag to mark a block of optional data. The byte following this tag
indicates the size of the block.
Constant Value: 119

#### public static final byte
**TC_BLOCKDATALONG**

Tag to mark a long block of data. The long following this tag
indicates the size of the block.
Constant Value: 122

#### public static final byte
**TC_CLASS**

Tag to mark a reference to a class.
Constant Value: 118

#### public static final byte
**TC_CLASSDESC**

Tag to mark a new class descriptor.
Constant Value: 114

#### public static final byte
**TC_ENDBLOCKDATA**

Tag to mark the end of block data blocks for an object.
Constant Value: 120

#### public static final byte
**TC_ENUM**

Tag to mark a new enum.
Constant Value: 126

#### public static final byte
**TC_EXCEPTION**

Tag to mark an exception.
Constant Value: 123

#### public static final byte
**TC_LONGSTRING**

Tag to mark a long string.
Constant Value: 124

#### public static final byte
**TC_MAX**

The maximum tag value.
Constant Value: 126

#### public static final byte
**TC_NULL**

Tag to mark a `null` object reference.
Constant Value: 112

#### public static final byte
**TC_OBJECT**

Tag to mark a new object.
Constant Value: 115

#### public static final byte
**TC_PROXYCLASSDESC**

Tag to mark a new proxy class descriptor.
Constant Value: 125

#### public static final byte
**TC_REFERENCE**

Tag to mark a reference to an object that has already been written to the
stream.
Constant Value: 113

#### public static final byte
**TC_RESET**

Tag to mark a stream reset.
Constant Value: 121

#### public static final byte
**TC_STRING**

Tag to mark a new string.
Constant Value: 116

#### public static final int
**baseWireHandle**

Handle for the first object that gets serialized.
Constant Value: 8257536

## Fields

#### public static final [SerializablePermission](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/SerializablePermission.html)
**SUBCLASS_IMPLEMENTATION_PERMISSION**

Permission constant to enable subclassing of ObjectInputStream and
ObjectOutputStream.

#### public static final [SerializablePermission](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/SerializablePermission.html)
**SUBSTITUTION_PERMISSION**

Permission constant to enable object substitution during serialization
and deserialization.