Summary: Nested |
Field | Method | Constr Detail: Nested |
Field | Method | Constr
java.io
Interface ObjectStreamConstants
- Known Implementing Classes:
- ObjectInputStream, ObjectOutputStream
This interface contains constants that are used in object
serialization. This interface is used by ObjectOutputStream
,
ObjectInputStream
, and ObjectStreamClass
.
The values for these constants are specified by the Java library
specification.
Field Summary
static byte
SC_BLOCK_DATA
- Flag used in
ObjectStreamClass
to designate that
externalizable data is written in block data mode.
static byte
SC_ENUM
- Flag used in
ObjectStreamClass
to designate that the class
is an enum constant.
static byte
SC_EXTERNALIZABLE
- Flag used in
ObjectStreamClass
to designate that the class
is externalizable.
static byte
SC_SERIALIZABLE
- Flag used in
ObjectStreamClass
to designate that the class
is serializeable.
static byte
SC_WRITE_METHOD
- Flag used in
ObjectStreamClass
to designate that the class
defines the writeObject
method.
static short
STREAM_MAGIC
- The magic number that is written as part of the stream header.
static short
STREAM_VERSION
- The stream version number that is written as part of the stream header.
static byte
TC_ARRAY
- Token value to designate a new array is next in the stream.
static byte
TC_BASE
- The first token value.
static byte
TC_BLOCKDATA
- Token value to designate a block of primitive data is next in the stream.
static byte
TC_BLOCKDATALONG
- Token value to designate a long block of primitive data is next in the
stream.
static byte
TC_CLASS
- Token reference to designate a reference to a class.
static byte
TC_CLASSDESC
- Token value to designate a class descriptor is next in the stream.
static byte
TC_ENDBLOCKDATA
- Token value to designate the end of a block of primitve data.
static byte
TC_ENUM
- Token value to designate an enum constant is next in the stream.
static byte
TC_EXCEPTION
- Token value to designate an exception occured during serialization.
static byte
TC_LONGSTRING
- Token value to designate a long string is next in the stream.
static byte
TC_MAX
- The last token value.
static byte
TC_NULL
- Token value to designate a
null
reference in the stream.
static byte
TC_OBJECT
- Token value to designate a new object is next in the stream.
static byte
TC_PROXYCLASSDESC
- Token value to designate a proxy class descriptor is next in the stream.
static byte
TC_REFERENCE
- Token value to designate a reference to an already serialized object.
static byte
TC_RESET
- Token value to designate a reset of the stream state.
static byte
TC_STRING
- Token value to designate a new string is next in the stream.
static int
baseWireHandle
- The first handle that will be assigned to an object, for later references.
Field Details
PROTOCOL_VERSION_1
public static final int PROTOCOL_VERSION_1
The serialization stream protocol version 1. This version was
the default serialization protocol before JDK 1.2.
PROTOCOL_VERSION_2
public static final int PROTOCOL_VERSION_2
The serialization stream protocol version 2. This version is
used as the default serialization protocol since JDK 1.2.
SC_BLOCK_DATA
public static final byte SC_BLOCK_DATA
Flag used in ObjectStreamClass
to designate that
externalizable data is written in block data mode.
SC_ENUM
public static final byte SC_ENUM
Flag used in ObjectStreamClass
to designate that the class
is an enum constant.
SC_EXTERNALIZABLE
public static final byte SC_EXTERNALIZABLE
Flag used in ObjectStreamClass
to designate that the class
is externalizable.
SC_SERIALIZABLE
public static final byte SC_SERIALIZABLE
Flag used in ObjectStreamClass
to designate that the class
is serializeable.
SC_WRITE_METHOD
public static final byte SC_WRITE_METHOD
Flag used in ObjectStreamClass
to designate that the class
defines the writeObject
method.
STREAM_MAGIC
public static final short STREAM_MAGIC
The magic number that is written as part of the stream header.
STREAM_VERSION
public static final short STREAM_VERSION
The stream version number that is written as part of the stream header.
Note that this is different from the protocol version that specifies
the data format for the stream.
TC_ARRAY
public static final byte TC_ARRAY
Token value to designate a new array is next in the stream.
TC_BASE
public static final byte TC_BASE
The first token value.
TC_BLOCKDATA
public static final byte TC_BLOCKDATA
Token value to designate a block of primitive data is next in the stream.
The next byte in the stream holds the size of the block (in bytes).
TC_BLOCKDATALONG
public static final byte TC_BLOCKDATALONG
Token value to designate a long block of primitive data is next in the
stream. The next long in the stream holds the size of the block
(in bytes).
TC_CLASS
public static final byte TC_CLASS
Token reference to designate a reference to a class.
TC_CLASSDESC
public static final byte TC_CLASSDESC
Token value to designate a class descriptor is next in the stream.
TC_ENDBLOCKDATA
public static final byte TC_ENDBLOCKDATA
Token value to designate the end of a block of primitve data.
TC_ENUM
public static final byte TC_ENUM
Token value to designate an enum constant is next in the stream.
TC_EXCEPTION
public static final byte TC_EXCEPTION
Token value to designate an exception occured during serialization.
TC_LONGSTRING
public static final byte TC_LONGSTRING
Token value to designate a long string is next in the stream.
TC_MAX
public static final byte TC_MAX
The last token value.
TC_NULL
public static final byte TC_NULL
Token value to designate a null
reference in the stream.
TC_OBJECT
public static final byte TC_OBJECT
Token value to designate a new object is next in the stream.
TC_PROXYCLASSDESC
public static final byte TC_PROXYCLASSDESC
Token value to designate a proxy class descriptor is next in the stream.
TC_REFERENCE
public static final byte TC_REFERENCE
Token value to designate a reference to an already serialized object.
TC_RESET
public static final byte TC_RESET
Token value to designate a reset of the stream state.
TC_STRING
public static final byte TC_STRING
Token value to designate a new string is next in the stream.
baseWireHandle
public static final int baseWireHandle
The first handle that will be assigned to an object, for later references.
ObjectStreamConstants.java -- Interface containing constant values
used in reading and writing serialized objects
Copyright (C) 1998, 1999, 2003, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.