Package org.waveprotocol.wave.communication

Examples of org.waveprotocol.wave.communication.Blob


  }

  @Override
  public Blob getHistoryHash() {
    switchToProto();
    return new Blob(Codec.encode(proto.getHistoryHash().toByteArray()));
  }
View Full Code Here


      JsonElement elem = jsonObject.get("1");
      setVersion(elem.getAsDouble());
    }
    if (jsonObject.has("2")) {
      JsonElement elem = jsonObject.get("2");
      setHistoryHash(new Blob(elem.getAsString()));
    }
  }
View Full Code Here

  }

  @Override
  public Blob getSignatureBytes() {
    switchToProto();
    return new Blob(Codec.encode(proto.getSignatureBytes().toByteArray()));
  }
View Full Code Here

  }

  @Override
  public Blob getSignerId() {
    switchToProto();
    return new Blob(Codec.encode(proto.getSignerId().toByteArray()));
  }
View Full Code Here

    // fields set; however these (obviously) will need to be set by other means
    // before accessing this object.
    invalidateAll();
    if (jsonObject.has("1")) {
      JsonElement elem = jsonObject.get("1");
      setSignatureBytes(new Blob(elem.getAsString()));
    }
    if (jsonObject.has("2")) {
      JsonElement elem = jsonObject.get("2");
      setSignerId(new Blob(elem.getAsString()));
    }
    if (jsonObject.has("3")) {
      JsonElement elem = jsonObject.get("3");
      setSignatureAlgorithm(ProtoEnums.valOf(elem.getAsInt(), SignatureAlgorithm.values()));
    }
View Full Code Here

  }

  @Override
  public Blob getDelta() {
    switchToProto();
    return new Blob(Codec.encode(proto.getDelta().toByteArray()));
  }
View Full Code Here

    // fields set; however these (obviously) will need to be set by other means
    // before accessing this object.
    invalidateAll();
    if (jsonObject.has("1")) {
      JsonElement elem = jsonObject.get("1");
      setDelta(new Blob(elem.getAsString()));
    }
    if (jsonObject.has("2")) {
      JsonElement elem = jsonObject.get("2");
      {
        JsonArray array = elem.getAsJsonArray();
View Full Code Here

  @Override
  public List<Blob> getCertificate() {
    switchToProto();
    List<Blob> list = new ArrayList<Blob>();
    for (int i = 0; i < getCertificateSize(); i++) {
      Blob blob = new Blob(Codec.encode(proto.getCertificate(i).toByteArray()));
      list.add(blob);
    }
    return list;
  }
View Full Code Here

  }

  @Override
  public Blob getCertificate(int n) {
    switchToProto();
    return new Blob(Codec.encode(proto.getCertificate(n).toByteArray()));
  }
View Full Code Here

    if (jsonObject.has("3")) {
      JsonElement elem = jsonObject.get("3");
      {
        JsonArray array = elem.getAsJsonArray();
        for (int i = 0; i < array.size(); i++) {
          addCertificate(new Blob(array.get(i).getAsString()));
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.communication.Blob

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.