public static final class Pair.Externalizer extends Object implements Externalizer, Externalizable
Pair instances.| Constructor and Description |
|---|
Externalizer() |
| Modifier and Type | Method and Description |
|---|---|
Object |
createExternal(Class<?> subjectType,
ObjectInput input)
Create an instance of a type.
|
static Pair.Externalizer |
getInstance()
Get the single instance.
|
void |
readExternal(ObjectInput in) |
protected Object |
readResolve()
Resolve the object to the single externalizer instance.
|
void |
writeExternal(Object subject,
ObjectOutput output)
Write the external representation of an object.
|
void |
writeExternal(ObjectOutput out) |
public static Pair.Externalizer getInstance()
public void writeExternal(Object subject, ObjectOutput output) throws IOException
writeExternal in interface Externalizersubject - the object to externalizeoutput - the outputIOException - if an error occurspublic Object createExternal(Class<?> subjectType, ObjectInput input) throws IOException, 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.createExternal in interface ExternalizersubjectType - the type of object to createinput - the inputIOException - if an error occursClassNotFoundException - if a class could not be found during readpublic void writeExternal(ObjectOutput out)
writeExternal in interface Externalizablepublic void readExternal(ObjectInput in)
readExternal in interface Externalizableprotected Object readResolve()
Copyright © 2017 JBoss by Red Hat. All rights reserved.