Examples of Derialize()


Examples of com.bj58.spat.gaea.serializer.serializer.Serializer.Derialize()

  public void TestChar() throws Exception {
    Serializer serializer = new Serializer();
    char data = 'δΈ­';
    byte[] buffer = serializer.Serialize(data);
    assertNotNull(buffer);
    Object obj = serializer.Derialize(buffer, char.class);
    Object expect = data;
    assertEquals(expect, obj);
  }

  @Test
View Full Code Here

Examples of com.bj58.spat.gaea.serializer.serializer.Serializer.Derialize()

  public void TestByte() throws Exception {
    Serializer serializer = new Serializer();
    Object data = 120;
    byte[] buffer = serializer.Serialize(data);
    assertNotNull(buffer);
    Object obj = serializer.Derialize(buffer, data.getClass());
    Object expect = data;
    assertEquals(expect, obj);
  }

  @Test
View Full Code Here

Examples of com.bj58.spat.gaea.serializer.serializer.Serializer.Derialize()

    a2.add(2);
    Object data = new ArrayList[] { a1, a2 };

    byte[] buffer = serializer.Serialize(data);
    assertNotNull(buffer);
    Object obj = serializer.Derialize(buffer, data.getClass());
    Object expect = data;

    Object a = Array.newInstance(List.class, 3);

    assertEquals(expect, obj);
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.