Package org.msgpack

Examples of org.msgpack.MessagePack.createBufferPacker()


    public void testReferenceTypeFieldsClassNotNullable(ReferenceTypeFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<ReferenceTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(ReferenceTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(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();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<ListTypeFieldsClass> tmpl = builder.buildTemplate(ListTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(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();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<ListTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(ListTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(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();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<MapTypeFieldsClass> tmpl = builder.buildTemplate(MapTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(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();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<MapTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(MapTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(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();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<FinalClass> tmpl = builder.buildTemplate(FinalClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(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();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<ModifiersFieldsClass> tmpl = builder.buildTemplate(ModifiersFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  ModifiersFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
View Full Code Here

    public void testModifiersFieldsClassNotNullable(ModifiersFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<ModifiersFieldsClassNotNullable> tmpl = builder.buildTemplate(ModifiersFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  ModifiersFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
View Full Code Here

    public void testUserDefinedTypeFieldsClass(UserDefinedTypeFieldsClass v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<UserDefinedTypeFieldsClass> tmpl = builder.buildTemplate(UserDefinedTypeFieldsClass.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  UserDefinedTypeFieldsClass ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
View Full Code Here

    public void testUserDefinedTypeFieldsClassNotNullable(UserDefinedTypeFieldsClassNotNullable v) throws Exception {
  MessagePack msgpack = new MessagePack();
  TemplateRegistry registry = new TemplateRegistry();
  ReflectionBeansTemplateBuilder builder = new ReflectionBeansTemplateBuilder(registry);
  Template<UserDefinedTypeFieldsClassNotNullable> tmpl = builder.buildTemplate(UserDefinedTypeFieldsClassNotNullable.class);
  BufferPacker packer = msgpack.createBufferPacker();
  tmpl.write(packer, v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  UserDefinedTypeFieldsClassNotNullable ret = tmpl.read(unpacker, null);
  assertEquals(v, ret);
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.