JavaScript is disabled on your browser.
Skip navigation links
Java™ Platform
Standard Ed. 8
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
compact1, compact2, compact3
java.io

Interface ObjectStreamConstants

  • All Known Implementing Classes:
    ObjectInputStream, ObjectOutputStream


    public interface ObjectStreamConstants
    Constants written into the Object Serialization Stream.
    Since:
    JDK 1.1
    • Field Detail

      • STREAM_MAGIC

        static final short STREAM_MAGIC
        Magic number that is written to the stream header.
        See Also:
        Constant Field Values
      • STREAM_VERSION

        static final short STREAM_VERSION
        Version number that is written to the stream header.
        See Also:
        Constant Field Values
      • TC_REFERENCE

        static final byte TC_REFERENCE
        Reference to an object already written into the stream.
        See Also:
        Constant Field Values
      • TC_BLOCKDATA

        static final byte TC_BLOCKDATA
        Block 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_ENDBLOCKDATA
        End of optional block data blocks for an object.
        See Also:
        Constant Field Values
      • TC_RESET

        static final byte TC_RESET
        Reset stream context. All handles written into stream are reset.
        See Also:
        Constant Field Values
      • TC_BLOCKDATALONG

        static final byte TC_BLOCKDATALONG
        long Block data. The long following the tag indicates the number of bytes in this block data.
        See Also:
        Constant Field Values
      • TC_PROXYCLASSDESC

        static final byte TC_PROXYCLASSDESC
        new Proxy Class Descriptor.
        See Also:
        Constant Field Values
      • baseWireHandle

        static final int baseWireHandle
        First wire handle to be assigned.
        See Also:
        Constant Field Values
      • SC_WRITE_METHOD

        static final byte SC_WRITE_METHOD
        Bit 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_DATA
        Bit 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_SERIALIZABLE
        Bit mask for ObjectStreamClass flag. Indicates class is Serializable.
        See Also:
        Constant Field Values
      • SC_EXTERNALIZABLE

        static final byte SC_EXTERNALIZABLE
        Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.
        See Also:
        Constant Field Values
      • SC_ENUM

        static final byte SC_ENUM
        Bit mask for ObjectStreamClass flag. Indicates class is an enum type.
        Since:
        1.5
        See Also:
        Constant Field Values
      • PROTOCOL_VERSION_1

        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.

        Since:
        1.2
        See Also:
        ObjectOutputStream.useProtocolVersion(int), Constant Field Values
      • PROTOCOL_VERSION_2

        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.

        Since:
        1.2
        See Also:
        ObjectOutputStream.useProtocolVersion(int), SC_BLOCK_DATA, Constant Field Values
Skip navigation links
Java™ Platform
Standard Ed. 8
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Scripting on this page tracks web page traffic, but does not change the content in any way.

AltStyle によって変換されたページ (->オリジナル) /