public final class ExternalizedObject extends Object implements Externalizable, Creator
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.Constructor and Description |
---|
ExternalizedObject() |
ExternalizedObject(Externalizer externalizer,
Object obj) |
Modifier and Type | Method and Description |
---|---|
<T> T |
create(Class<T> clazz)
Create an object instance.
|
void |
readExternal(ObjectInput in) |
protected Object |
readResolve()
Return the externalized object after
readExternal() completes. |
void |
writeExternal(ObjectOutput out) |
public ExternalizedObject()
public ExternalizedObject(Externalizer externalizer, Object obj)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
protected Object readResolve()
readExternal()
completes.ObjectStreamException
- neverpublic <T> T create(Class<T> clazz) throws InvalidClassException
create
in interface Creator
clazz
- the type of object to createInvalidClassException
- if an instance of the class could not be instantiated for some reasonCopyright © 2021 JBoss by Red Hat. All rights reserved.