public class FileSerializer
extends com.esotericsoftware.kryo.Serializer<java.io.File>
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.Constructor and Description |
---|
FileSerializer() |
Modifier and Type | Method and Description |
---|---|
java.io.File |
read(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
java.lang.Class<java.io.File> type) |
void |
write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
java.io.File file) |
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, java.io.File file)
write
in class com.esotericsoftware.kryo.Serializer<java.io.File>
public java.io.File read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, java.lang.Class<java.io.File> type)
read
in class com.esotericsoftware.kryo.Serializer<java.io.File>