Class FileSerializer
java.lang.Object
com.esotericsoftware.kryo.Serializer<File>
org.springframework.integration.codec.kryo.FileSerializer
public class FileSerializer extends com.esotericsoftware.kryo.Serializer<File>
A custom Kryo
Serializer
for serializing File payloads.
It serializes the file path and creates a new File instance to preserve the original path.
File does not preserve the absolute otherwise as prefixLength
is declared transient.- Since:
- 4.2
- Author:
- David Turanski
-
Constructor Summary
Constructors Constructor Description FileSerializer()
-
Method Summary
-
Constructor Details
-
FileSerializer
public FileSerializer()
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, File file)- Specified by:
write
in classcom.esotericsoftware.kryo.Serializer<File>
-
read
public File read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<File> type)- Specified by:
read
in classcom.esotericsoftware.kryo.Serializer<File>
-