Package com.esotericsoftware.kryo.serializers.DefaultSerializers

Examples of com.esotericsoftware.kryo.serializers.DefaultSerializers.StringSerializer


    addDefaultSerializer(Calendar.class, CalendarSerializer.class);
    lowPriorityDefaultSerializerCount = defaultSerializers.size();

    // Primitives and string. Primitive wrappers automatically use the same registration as primitives.
    register(int.class, new IntSerializer());
    register(String.class, new StringSerializer());
    register(float.class, new FloatSerializer());
    register(boolean.class, new BooleanSerializer());
    register(byte.class, new ByteSerializer());
    register(char.class, new CharSerializer());
    register(short.class, new ShortSerializer());
View Full Code Here


/** @author Nathan Sweet <misc@n4te.com> */
public class BlowfishSerializerTest extends KryoTestCase {
  public void testZip () throws Exception {
    byte[] key = KeyGenerator.getInstance("Blowfish").generateKey().getEncoded();
    kryo.register(String.class, new BlowfishSerializer(new StringSerializer(), key));
    roundTrip(49, 49"abcdefabcdefabcdefabcdefabcdefabcdefabcdef");
  }
View Full Code Here

    kryo.register(ArrayList.class, serializer);
    kryo.register(LinkedList.class, serializer);
    kryo.register(CopyOnWriteArrayList.class, serializer);
    serializer.setElementClass(String.class, kryo.getSerializer(String.class));
    roundTrip(8, 8, list("1", "2", "3"));
    serializer.setElementClass(String.class, new StringSerializer());
    roundTrip(8, 8, list("1", "2", "3"));
    serializer.setElementsCanBeNull(false);
    roundTrip(8, 8, list("1", "2", "3"));

    kryo.register(TreeSet.class);
View Full Code Here

import com.esotericsoftware.kryo.serializers.DeflateSerializer;

/** @author Nathan Sweet <misc@n4te.com> */
public class DeflateSerializerTest extends KryoTestCase {
  public void testString () {
    kryo.register(String.class, new DeflateSerializer(new StringSerializer()));
    roundTrip(15, 15, "abcdefabcdefabcdefabcdefabcdefabcdefabcdef");
  }
View Full Code Here

    register(short.class, new ShortSerializer());
    register(int.class, new IntSerializer());
    register(long.class, new LongSerializer());
    register(float.class, new FloatSerializer());
    register(double.class, new DoubleSerializer());
    register(String.class, new StringSerializer());
  }
View Full Code Here

    addDefaultSerializer(Locale.class, LocaleSerializer.class);
    lowPriorityDefaultSerializerCount = defaultSerializers.size();

    // Primitives and string. Primitive wrappers automatically use the same registration as primitives.
    register(int.class, new IntSerializer());
    register(String.class, new StringSerializer());
    register(float.class, new FloatSerializer());
    register(boolean.class, new BooleanSerializer());
    register(byte.class, new ByteSerializer());
    register(char.class, new CharSerializer());
    register(short.class, new ShortSerializer());
View Full Code Here

    addDefaultSerializer(Calendar.class, CalendarSerializer.class);
    lowPriorityDefaultSerializerCount = defaultSerializers.size();

    // Primitives and string. Primitive wrappers automatically use the same registration as primitives.
    register(int.class, new IntSerializer());
    register(String.class, new StringSerializer());
    register(float.class, new FloatSerializer());
    register(boolean.class, new BooleanSerializer());
    register(byte.class, new ByteSerializer());
    register(char.class, new CharSerializer());
    register(short.class, new ShortSerializer());
View Full Code Here

    addDefaultSerializer(Locale.class, LocaleSerializer.class);
    lowPriorityDefaultSerializerCount = defaultSerializers.size();

    // Primitives and string. Primitive wrappers automatically use the same registration as primitives.
    register(int.class, new IntSerializer());
    register(String.class, new StringSerializer());
    register(float.class, new FloatSerializer());
    register(boolean.class, new BooleanSerializer());
    register(byte.class, new ByteSerializer());
    register(char.class, new CharSerializer());
    register(short.class, new ShortSerializer());
View Full Code Here

    addDefaultSerializer(Calendar.class, CalendarSerializer.class);
    lowPriorityDefaultSerializerCount = defaultSerializers.size();

    // Primitives and string. Primitive wrappers automatically use the same registration as primitives.
    register(int.class, new IntSerializer());
    register(String.class, new StringSerializer());
    register(float.class, new FloatSerializer());
    register(boolean.class, new BooleanSerializer());
    register(byte.class, new ByteSerializer());
    register(char.class, new CharSerializer());
    register(short.class, new ShortSerializer());
View Full Code Here

    kryo.register(ArrayList.class, serializer);
    kryo.register(LinkedList.class, serializer);
    kryo.register(CopyOnWriteArrayList.class, serializer);
    serializer.setElementClass(String.class, kryo.getSerializer(String.class));
    roundTrip(8, 8, list("1", "2", "3"));
    serializer.setElementClass(String.class, new StringSerializer());
    roundTrip(8, 8, list("1", "2", "3"));
    serializer.setElementsCanBeNull(false);
    roundTrip(8, 8, list("1", "2", "3"));

    kryo.register(TreeSet.class);
View Full Code Here

TOP

Related Classes of com.esotericsoftware.kryo.serializers.DefaultSerializers.StringSerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.