Examples of PbSerializer


Examples of com.jd.glowworm.serializer.PBSerializer

public class PB {
  public static byte[] toPBBytes(Object objectParm)
  {
    SerializeWriter tmpSerializeWriter = new SerializeWriter();
    PBSerializer tmpPBSerializer = new PBSerializer(tmpSerializeWriter);
   
    // 对象类型字符串
    Class<?> clazz = objectParm.getClass();
    tmpSerializeWriter.getCodedOutputStream().writeString(clazz.getName());
   
    tmpPBSerializer.write(objectParm);
    return tmpSerializeWriter.getCodedOutputStream().getBytes();
  }
View Full Code Here

Examples of org.jbox2d.serialization.pb.PbSerializer

  public TestbedTest() {
    for (int i = 0; i < MAX_CONTACT_POINTS; i++) {
      points[i] = new ContactPoint();
    }
    serializer = new PbSerializer(this, new SignerAdapter(this) {
      @Override
      public Long getTag(Body argBody) {
        if (isSaveLoadEnabled()) {
          if (argBody == groundBody) {
            return GROUND_BODY_TAG;
View Full Code Here

Examples of org.jbox2d.serialization.pb.PbSerializer

  public TestbedTest() {
    identity.setIdentity();
    for (int i = 0; i < MAX_CONTACT_POINTS; i++) {
      points[i] = new ContactPoint();
    }
    serializer = new PbSerializer(this, new SignerAdapter(this) {
      @Override
      public Long getTag(Body argBody) {
        if (isSaveLoadEnabled()) {
          if (argBody == groundBody) {
            return GROUND_BODY_TAG;
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.