public class StandardSerializer extends Object implements IElementSerializer
Constructor and Description |
---|
StandardSerializer() |
Modifier and Type | Method and Description |
---|---|
<T> T |
deSerialize(byte[] data,
ClassLoader loader)
Uses default de-serialization to turn a byte array into an object.
|
<T> byte[] |
serialize(T obj)
Serializes an object using default serialization.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deSerializeFrom, deSerializeFrom, deSerializeFrom, serializeTo, serializeTo, serializeTo
public StandardSerializer()
public <T> byte[] serialize(T obj) throws IOException
serialize
in interface IElementSerializer
T
- the type of the objectobj
- IOException
public <T> T deSerialize(byte[] data, ClassLoader loader) throws IOException, ClassNotFoundException
deSerialize
in interface IElementSerializer
data
- data bytesloader
- class loader to useIOException
ClassNotFoundException
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.