public final class SerializeUtility extends Object
Modifier and Type | Method and Description |
---|---|
static Serializable |
toSerializable(Object aObject)
Converts instances of common non-serializable types such as
Iterator and ListIterator into serializable instances. |
public static Serializable toSerializable(Object aObject)
Iterator
and ListIterator
into serializable instances.
Testing for the Serializable
interface is not sufficient to
determine whether an instance is serializable as of the special handling
of the Serializable
tag interface in the JVM. Though in case the
type of the instance is not tagged with the Serializable
interface, then null
is returned.
In case an instance's type provided is not supported by this method, then
the instance is returned as is; it might already be serializable.aObject
- The object to be turned into a serializable counterpart.
In case it is not identified or supported (it might already be
fully serializable), then the instance is returned unmodified.Serializable
. In case the type of the instance is not
tagged with the Serializable
interface, then
null
is returned.Copyright © 2017. All rights reserved.