
public interface Externalizer
extends java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
createExternal(java.lang.Class<?> subjectType,
java.io.ObjectInput input,
Creator defaultCreator)
Create an instance of a type.
|
void |
readExternal(java.lang.Object subject,
java.io.ObjectInput input)
Read the external representation of an object.
|
void |
writeExternal(java.lang.Object subject,
java.io.ObjectOutput output)
Write the external representation of an object.
|
void writeExternal(java.lang.Object subject,
java.io.ObjectOutput output)
throws java.io.IOException
subject - the object to externalizeoutput - the outputjava.io.IOException - if an error occursjava.lang.Object createExternal(java.lang.Class<?> subjectType,
java.io.ObjectInput input,
Creator defaultCreator)
throws java.io.IOException,
java.lang.ClassNotFoundException
input, or that may be deferred
to the readExternal() method. Instances may simply delegate the task to the given Creator.
Note that this method is called only on the leaf class, so externalizers for non-final classes that initialize
the instance from the stream need to be aware of this.subjectType - the type of object to createinput - the inputdefaultCreator - the configured creatorjava.io.IOException - if an error occursjava.lang.ClassNotFoundException - if a class could not be found during readvoid readExternal(java.lang.Object subject,
java.io.ObjectInput input)
throws java.io.IOException,
java.lang.ClassNotFoundException
subject - the object to readinput - the inputjava.io.IOException - if an error occursjava.lang.ClassNotFoundException - if a class could not be found during readCopyright © 2011 JBoss, a division of Red Hat, Inc.