Package com.esotericsoftware.kryo

Examples of com.esotericsoftware.kryo.Kryo.writeObject()


    public void testNumber() {
        Kryo kryo = new Kryo();
        Output out = new Output(100);
        String s = "Hello world";
        int five = 5;
        kryo.writeObject(out,s);
        kryo.writeObject(out,five);


    }
View Full Code Here


        Kryo kryo = new Kryo();
        Output out = new Output(100);
        String s = "Hello world";
        int five = 5;
        kryo.writeObject(out,s);
        kryo.writeObject(out,five);


    }

    enum E {
View Full Code Here

    @Test
    public void testKryoEnum() {
        Kryo kryo = new Kryo();
        kryo.register(E.class);
        Output b = new Output(100);
        kryo.writeObject(b, E.E1);
        Input i = new Input(b.getBuffer(),0,b.position());
        E instance = kryo.readObject(i, E.class);
    }

    @After
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.