org.jboss.marshalling.serial
Class ExternalizedObject
java.lang.Object
org.jboss.marshalling.serial.ExternalizedObject
- All Implemented Interfaces:
- Externalizable, Serializable, Creator
public final class ExternalizedObject
- extends Object
- implements Externalizable, Creator
An externalized object. This wrapper allows an object that was written with an Externalizer to be read by
standard Java serialization. Note that if an externalized object's child object graph ever refers to the original
object, there will be an error in the reconstructed object graph such that those references will refer to this
wrapper object rather than the properly externalized object.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalizedObject
public ExternalizedObject()
ExternalizedObject
public ExternalizedObject(Externalizer externalizer,
Object obj)
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
-
- Specified by:
writeExternal in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
-
- Specified by:
readExternal in interface Externalizable
- Throws:
IOException
ClassNotFoundException
readResolve
protected Object readResolve()
- Return the externalized object after
readExternal() completes.
- Returns:
- the externalized object
- Throws:
ObjectStreamException - never
create
public <T> T create(Class<T> clazz)
throws InvalidClassException
-
- Specified by:
create in interface Creator
- Throws:
InvalidClassException
Copyright © 2011 JBoss, a division of Red Hat, Inc.