Package com.taobao.metamorphosis.utils.codec

Examples of com.taobao.metamorphosis.utils.codec.Deserializer



    @Test
    public void testJavaDecoder() throws Exception {
        final Serializer encoder = CodecBuilder.buildSerializer(Codec_Type.JAVA);
        final Deserializer decoder = CodecBuilder.buildDeserializer(Codec_Type.JAVA);
        final byte buf[] = encoder.encodeObject(this.msg);
        final Message entity1 = (Message) decoder.decodeObject(buf);

        Assert.assertEquals(this.msg, entity1);
    }
View Full Code Here


    }


    @Test
    public void testHessianDecoder() throws Exception {
        final Deserializer decoder = CodecBuilder.buildDeserializer(Codec_Type.HESSIAN1);
        final Serializer encoder = CodecBuilder.buildSerializer(Codec_Type.HESSIAN1);

        final byte buf[] = encoder.encodeObject(this.msg);
        final Message entity1 = (Message) decoder.decodeObject(buf);

        Assert.assertEquals(this.msg, entity1);
    }
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.utils.codec.Deserializer

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.