JBoss Marshalling 1.4.1.Final

org.jboss.marshalling.serial
Class ExternalizedObject

java.lang.Object
  extended by 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

Constructor Summary
ExternalizedObject()
           
ExternalizedObject(Externalizer externalizer, Object obj)
           
 
Method Summary
<T> T
create(Class<T> clazz)
          
 void readExternal(ObjectInput in)
          
protected  Object readResolve()
          Return the externalized object after readExternal() completes.
 void writeExternal(ObjectOutput out)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalizedObject

public ExternalizedObject()

ExternalizedObject

public ExternalizedObject(Externalizer externalizer,
                          Object obj)
Method Detail

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

JBoss Marshalling 1.4.1.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.