Package org.msgpack.packer

Examples of org.msgpack.packer.BufferPacker


    public void testPrimitiveTypeFieldsClass(PrimitiveTypeFieldsClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<PrimitiveTypeFieldsClass> tmpl = builder.buildTemplate(PrimitiveTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  PrimitiveTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here


    public void testPrimitiveTypeFieldsClassNotNullable(PrimitiveTypeFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<PrimitiveTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(PrimitiveTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  PrimitiveTypeFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testReferenceTypeFieldsClass(ReferenceTypeFieldsClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<ReferenceTypeFieldsClass> tmpl = builder.buildTemplate(ReferenceTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  ReferenceTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testReferenceTypeFieldsClassNotNullable(ReferenceTypeFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<ReferenceTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(ReferenceTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  ReferenceTypeFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testListTypeFieldsClass(ListTypeFieldsClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<ListTypeFieldsClass> tmpl = builder.buildTemplate(ListTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  ListTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testListTypeFieldsClassNotNullable(ListTypeFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<ListTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(ListTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  ListTypeFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testMapTypeFieldsClass(MapTypeFieldsClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<MapTypeFieldsClass> tmpl = builder.buildTemplate(MapTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  MapTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testMapTypeFieldsClassNotNullable(MapTypeFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<MapTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(MapTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  MapTypeFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testFinalClass(FinalClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<FinalClass> tmpl = builder.buildTemplate(FinalClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  FinalClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

    public void testModifiersFieldsClass(ModifiersFieldsClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionTemplateBuilder builder = new ReflectionTemplateBuilder(registry);
  Template<ModifiersFieldsClass> tmpl = builder.buildTemplate(ModifiersFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker();
  unpacker.wrap(bytes);
  ModifiersFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
    }
View Full Code Here

TOP

Related Classes of org.msgpack.packer.BufferPacker

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.