コード例 #1
0
 public Validator deserialize(DataInputStream dis, int version) throws IOException {
   final TreeRequest request = TreeRequestVerbHandler.SERIALIZER.deserialize(dis, version);
   try {
     return new Validator(request, MerkleTree.serializer.deserialize(dis, version));
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }
コード例 #2
0
 public void serialize(Validator v, DataOutputStream dos, int version) throws IOException {
   TreeRequestVerbHandler.SERIALIZER.serialize(v.request, dos, version);
   MerkleTree.serializer.serialize(v.tree, dos, version);
   dos.flush();
 }