public class SerialJavaObject extends Object implements Serializable, Cloneable
JAVA_OBJECTvalue. Assuming the Java object implements the
Serializableinterface, this class simply wraps the serialization process.
If however, the serialization is not possible because
the Java object is not immediately serializable, this class will
attempt to serialize all non-static members to permit the object
state to be serialized.
Static or transient fields cannot be serialized; an attempt to serialize
them will result in a
SerialException object being thrown.
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns a clone of this
Compares this SerialJavaObject to the specified object.
Returns an array of
Returns a hash code for this SerialJavaObject.
public Object getObject() throws SerialException
Objectthat is a copy of this
SerialJavaObjectobject as an
Objectin the Java programming language
SerialException- if the instance is corrupt
public Field getFields() throws SerialException
Fieldobjects that contains each field of the object that this helper class is serializing.
SerialException- if an error is encountered accessing the serialized object
SecurityException- If a security manager, s, is present and the caller's class loader is not the same as or an ancestor of the class loader for the class of the object being serialized and invocation of
s.checkPackageAccess()denies access to the package of that class.
public boolean equals(Object o)
trueif and only if the argument is not
nulland is a
SerialJavaObjectobject that is identical to this object
public int hashCode()
SerialJavaObjectobject is taken as the hash code of the
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.