public class PojoCodec
extends java.lang.Object
| Constructor and Description |
|---|
PojoCodec() |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(byte[] bytes,
java.lang.Class<? extends T> type)
Deserialize an object of a given type
|
T |
deserialize(java.io.InputStream inputStream,
java.lang.Class<? extends T> type)
Deserialize an object of a given type
|
protected java.lang.Object |
doDeserialize(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
java.lang.Class<? extends java.lang.Object> type) |
protected void |
doSerialize(java.lang.Object object,
com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output) |
protected com.esotericsoftware.kryo.Kryo |
getKryoInstance() |
void |
serialize(T object,
java.io.OutputStream outputStream)
Serialize an object using an existing output stream
|
protected void doSerialize(java.lang.Object object,
com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output)
protected java.lang.Object doDeserialize(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
java.lang.Class<? extends java.lang.Object> type)
protected com.esotericsoftware.kryo.Kryo getKryoInstance()
public void serialize(T object, java.io.OutputStream outputStream) throws java.io.IOException
serialize in interface org.springframework.core.serializer.Serializer<T>object - the object to be serializedoutputStream - the output stream, e.g. a FileOutputStreamjava.io.IOExceptionpublic T deserialize(java.io.InputStream inputStream, java.lang.Class<? extends T> type) throws java.io.IOException
deserialize in interface MultiTypeCodec<T>inputStream - the input stream containing the serialized objecttype - the object's classjava.io.IOExceptionpublic T deserialize(byte[] bytes, java.lang.Class<? extends T> type) throws java.io.IOException
deserialize in interface MultiTypeCodec<T>bytes - the byte array containing the serialized objecttype - the object's classjava.io.IOException