Package de.javakaffee.kryoserializers
Class SubListSerializers.JavaUtilSubListSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<List<?>>
-
- de.javakaffee.kryoserializers.SubListSerializers.JavaUtilSubListSerializer
-
- Enclosing class:
- SubListSerializers
public static class SubListSerializers.JavaUtilSubListSerializer extends com.esotericsoftware.kryo.Serializer<List<?>>
Supports sublists created viaAbstractList.subList(int, int), e.g. LinkedList. In oracle jdk such sublists are represented byjava.util.SubList.
-
-
Field Summary
Fields Modifier and Type Field Description static Class<?>SUBLIST_CLASS
-
Constructor Summary
Constructors Constructor Description JavaUtilSubListSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.esotericsoftware.kryo.KryoaddDefaultSerializer(com.esotericsoftware.kryo.Kryo kryo)static booleancanSerialize(Class<?> type)Can be used to determine, if the given type can be handled by this serializer.List<?>copy(com.esotericsoftware.kryo.Kryo kryo, List<?> obj)List<?>read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends List<?>> clazz)voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, List<?> obj)
-
-
-
Field Detail
-
SUBLIST_CLASS
public static final Class<?> SUBLIST_CLASS
-
-
Method Detail
-
canSerialize
public static boolean canSerialize(Class<?> type)
Can be used to determine, if the given type can be handled by this serializer.- Parameters:
type- the class to check.- Returns:
trueif the given class can be serialized/deserialized by this serializer.
-
addDefaultSerializer
public static com.esotericsoftware.kryo.Kryo addDefaultSerializer(com.esotericsoftware.kryo.Kryo kryo)
-
read
public List<?> read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends List<?>> clazz)
- Specified by:
readin classcom.esotericsoftware.kryo.Serializer<List<?>>
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, List<?> obj)- Specified by:
writein classcom.esotericsoftware.kryo.Serializer<List<?>>
-
-