Class FileSerializer
java.lang.Object
com.esotericsoftware.kryo.Serializer<File>
org.springframework.integration.codec.kryo.FileSerializer
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, Artem Bilan
-
Constructor Summary
-
Method Summary
Methods inherited from class com.esotericsoftware.kryo.Serializer
copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
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<? extends File> type) - Specified by:
read
in classcom.esotericsoftware.kryo.Serializer<File>
-