Package net.sf.cindy.encoder

Examples of net.sf.cindy.encoder.SerialEncoder


    public static void main(String[] args) {
        // create new session
        Session session = new PipeSession();

        // set packet encoder and decoder
        session.setPacketEncoder(new SerialEncoder());
        session.setPacketDecoder(new SerialDecoder());

        // set session handler
        session.setSessionHandler(new SessionHandlerAdapter() {
View Full Code Here


            for (int i = 0; i < 10; i++) {
                int value = random.nextInt();

                Object obj1 = new Integer(value);

                Packet packet = new SerialEncoder().encode(null, obj1);
                assertNotNull(packet);

                Object obj2 = new SerialDecoder().decode(null, packet);
                assertEquals(obj1, obj2);
            }
View Full Code Here

TOP

Related Classes of net.sf.cindy.encoder.SerialEncoder

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.