1 /*
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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.
10 *
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).
16 *
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.
20 *
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
74 /**
75 * The shared serialization delegate for this package.
76 *
77 * @implNote
78 * This class is mutable and should be created once per serialization.
79 *
80 * @serial include
81 * @since 1.8
82 */
83 final class Ser implements Externalizable {
84
85 /**
86 * Serialization version.
87 */
88 private static final long serialVersionUID = -8885321777449118786L;
89
90 /** Type for ZoneRules. */
91 static final byte ZRULES = 1;
92 /** Type for ZoneOffsetTransition. */
93 static final byte ZOT = 2;
94 /** Type for ZoneOffsetTransition. */
95 static final byte ZOTRULE = 3;
96
97 /** The type being serialized. */
98 private byte type;
99 /** The object being serialized. */
100 private Object object;
101
102 /**
103 * Constructor for deserialization.
104 */
105 public Ser() {
106 }
107
108 /**
109 * Creates an instance for serialization.
110 *
111 * @param type the type
112 * @param object the object
113 */
114 Ser(byte type, Object object) {
|
1 /*
2 * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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.
10 *
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).
16 *
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.
20 *
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
74 /**
75 * The shared serialization delegate for this package.
76 *
77 * @implNote
78 * This class is mutable and should be created once per serialization.
79 *
80 * @serial include
81 * @since 1.8
82 */
83 final class Ser implements Externalizable {
84
85 /**
86 * Serialization version.
87 */
88 private static final long serialVersionUID = -8885321777449118786L;
89
90 /** Type for ZoneRules. */
91 static final byte ZRULES = 1;
92 /** Type for ZoneOffsetTransition. */
93 static final byte ZOT = 2;
94 /** Type for ZoneOffsetTransitionRule. */
95 static final byte ZOTRULE = 3;
96
97 /** The type being serialized. */
98 private byte type;
99 /** The object being serialized. */
100 private Object object;
101
102 /**
103 * Constructor for deserialization.
104 */
105 public Ser() {
106 }
107
108 /**
109 * Creates an instance for serialization.
110 *
111 * @param type the type
112 * @param object the object
113 */
114 Ser(byte type, Object object) {
|