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); } }
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(); }