equal
deleted
inserted
replaced
81 * |
81 * |
82 * The bits in this BitSet. The ith bit is stored in bits[i/64] at |
82 * The bits in this BitSet. The ith bit is stored in bits[i/64] at |
83 * bit position i % 64 (where bit position 0 refers to the least |
83 * bit position i % 64 (where bit position 0 refers to the least |
84 * significant bit and 63 refers to the most significant bit). |
84 * significant bit and 63 refers to the most significant bit). |
85 */ |
85 */ |
|
86 @java.io.Serial |
86 private static final ObjectStreamField[] serialPersistentFields = { |
87 private static final ObjectStreamField[] serialPersistentFields = { |
87 new ObjectStreamField("bits", long[].class), |
88 new ObjectStreamField("bits", long[].class), |
88 }; |
89 }; |
89 |
90 |
90 /** |
91 /** |
102 * the user knows what he's doing and try harder to preserve it. |
103 * the user knows what he's doing and try harder to preserve it. |
103 */ |
104 */ |
104 private transient boolean sizeIsSticky = false; |
105 private transient boolean sizeIsSticky = false; |
105 |
106 |
106 /* use serialVersionUID from JDK 1.0.2 for interoperability */ |
107 /* use serialVersionUID from JDK 1.0.2 for interoperability */ |
|
108 @java.io.Serial |
107 private static final long serialVersionUID = 7997698588986878753L; |
109 private static final long serialVersionUID = 7997698588986878753L; |
108 |
110 |
109 /** |
111 /** |
110 * Given a bit index, return word index containing it. |
112 * Given a bit index, return word index containing it. |
111 */ |
113 */ |
1122 |
1124 |
1123 /** |
1125 /** |
1124 * Save the state of the {@code BitSet} instance to a stream (i.e., |
1126 * Save the state of the {@code BitSet} instance to a stream (i.e., |
1125 * serialize it). |
1127 * serialize it). |
1126 */ |
1128 */ |
|
1129 @java.io.Serial |
1127 private void writeObject(ObjectOutputStream s) |
1130 private void writeObject(ObjectOutputStream s) |
1128 throws IOException { |
1131 throws IOException { |
1129 |
1132 |
1130 checkInvariants(); |
1133 checkInvariants(); |
1131 |
1134 |
1139 |
1142 |
1140 /** |
1143 /** |
1141 * Reconstitute the {@code BitSet} instance from a stream (i.e., |
1144 * Reconstitute the {@code BitSet} instance from a stream (i.e., |
1142 * deserialize it). |
1145 * deserialize it). |
1143 */ |
1146 */ |
|
1147 @java.io.Serial |
1144 private void readObject(ObjectInputStream s) |
1148 private void readObject(ObjectInputStream s) |
1145 throws IOException, ClassNotFoundException { |
1149 throws IOException, ClassNotFoundException { |
1146 |
1150 |
1147 ObjectInputStream.GetField fields = s.readFields(); |
1151 ObjectInputStream.GetField fields = s.readFields(); |
1148 words = (long[]) fields.get("bits", null); |
1152 words = (long[]) fields.get("bits", null); |