private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
Object[] array
field.IOException
- if an I/O error occursClassNotFoundException
- if a serialized class cannot be loadedInvalidObjectException
- if the count is negativeprivate void writeObject(ObjectOutputStream oos) throws IOException
Object[] array
field.IOException
- if an I/O error occursprivate Object readResolve() throws ObjectStreamException
InvalidObjectException
- if the tag value is illegal or if an exception
is thrown during creation of the collectionObjectStreamException
- if another serialization error has occurredint tag
List
, 2 for an unmodifiable Set
, and 3 for
an unmodifiable Map
. Any other value causes an
InvalidObjectException
to be thrown. The high
order 24 bits are zero when an instance is serialized,
and they are ignored when an instance is deserialized.
They can thus be used by future implementations without
causing compatibility issues.
The tag value also determines the interpretation of the
transient Object[] array
field.
For List
and Set
, the array's length is the size
of the collection, and the array contains the elements of the collection.
Null elements are not allowed. For Set
, duplicate elements
are not allowed.
For Map
, the array's length is twice the number of mappings
present in the map. The array length is necessarily even.
The array contains a succession of key and value pairs:
k1, v1, k2, v2, ..., kN, vN.
Nulls are not allowed,
and duplicate keys are not allowed.
CountedCompleter<T> completer
int pending
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
ClassNotFoundException
- if the class of a serialized object
could not be foundIOException
- if an I/O error occursprivate void writeObject(ObjectOutputStream s) throws IOException
null
if noneIOException
- if an I/O error occursint status
Object result
private void writeObject(ObjectOutputStream s) throws IOException
ThreadLocalRandom
to a stream (that is, serializes it).IOException
- if an I/O error occursprivate Object readResolve()
current
thread's ThreadLocalRandom
.boolean initialized
long rnd
Copyright © 2020. All rights reserved.