Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
2 * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
29 * Constants written into the Object Serialization Stream.
34 public interface ObjectStreamConstants {
37 * Magic number that is written to the stream header.
39 final static short STREAM_MAGIC = (short)0xaced;
42 * Version number that is written to the stream header.
44 final static short STREAM_VERSION = 5;
46 /* Each item in the stream is preceded by a tag
52 final static byte TC_BASE = 0x70;
55 * Null object reference.
57 final static byte TC_NULL = (byte)0x70;
60 * Reference to an object already written into the stream.
62 final static byte TC_REFERENCE = (byte)0x71;
65 * new Class Descriptor.
67 final static byte TC_CLASSDESC = (byte)0x72;
72 final static byte TC_OBJECT = (byte)0x73;
77 final static byte TC_STRING = (byte)0x74;
82 final static byte TC_ARRAY = (byte)0x75;
87 final static byte TC_CLASS = (byte)0x76;
90 * Block of optional data. Byte following tag indicates number
91 * of bytes in this block data.
93 final static byte TC_BLOCKDATA = (byte)0x77;
96 * End of optional block data blocks for an object.
98 final static byte TC_ENDBLOCKDATA = (byte)0x78;
101 * Reset stream context. All handles written into stream are reset.
103 final static byte TC_RESET = (byte)0x79;
106 * long Block data. The long following the tag indicates the
107 * number of bytes in this block data.
109 final static byte TC_BLOCKDATALONG= (byte)0x7A;
112 * Exception during write.
114 final static byte TC_EXCEPTION = (byte)0x7B;
119 final static byte TC_LONGSTRING = (byte)0x7C;
122 * new Proxy Class Descriptor.
124 final static byte TC_PROXYCLASSDESC = (byte)0x7D;
130 final static byte TC_ENUM = (byte)0x7E;
135 final static byte TC_MAX = (byte)0x7E;
138 * First wire handle to be assigned.
140 final static int baseWireHandle = 0x7e0000;
143 /******************************************************/
144 /* Bit masks for ObjectStreamClass flag.*/
147 * Bit mask for ObjectStreamClass flag. Indicates a Serializable class
148 * defines its own writeObject method.
150 final static byte SC_WRITE_METHOD = 0x01;
153 * Bit mask for ObjectStreamClass flag. Indicates Externalizable data
154 * written in Block Data mode.
155 * Added for PROTOCOL_VERSION_2.
157 * @see #PROTOCOL_VERSION_2
160 final static byte SC_BLOCK_DATA = 0x08;
163 * Bit mask for ObjectStreamClass flag. Indicates class is Serializable.
165 final static byte SC_SERIALIZABLE = 0x02;
168 * Bit mask for ObjectStreamClass flag. Indicates class is Externalizable.
170 final static byte SC_EXTERNALIZABLE = 0x04;
173 * Bit mask for ObjectStreamClass flag. Indicates class is an enum type.
176 final static byte SC_ENUM = 0x10;
179 /* *******************************************************************/
180 /* Security permissions */
183 * A Stream Protocol Version. <p>
185 * All externalizable data is written in JDK 1.1 external data
186 * format after calling this method. This version is needed to write
187 * streams containing Externalizable data that can be read by
188 * pre-JDK 1.1.6 JVMs.
190 * @see java.io.ObjectOutputStream#useProtocolVersion(int)
193 public final static int PROTOCOL_VERSION_1 = 1;
197 * A Stream Protocol Version. <p>
199 * This protocol is written by JVM 1.2.
201 * Externalizable data is written in block data mode and is
202 * terminated with TC_ENDBLOCKDATA. Externalizable classdescriptor
203 * flags has SC_BLOCK_DATA enabled. JVM 1.1.6 and greater can
204 * read this format change.
206 * Enables writing a nonSerializable class descriptor into the
207 * stream. The serialVersionUID of a nonSerializable class is
210 * @see java.io.ObjectOutputStream#useProtocolVersion(int)
211 * @see #SC_BLOCK_DATA
214 public final static int PROTOCOL_VERSION_2 = 2;