> +import com.google.common.primitives.Bytes;
> +
> +/**
> + * Calculates the linear hash and the tree hash of the payload.
> + */
> +public class TreeHasher {
> +
> +   private static int CHUNK_SIZE = 1024 * 1024;
> +
> +   private final Payload payload;
> +   private HashCode hash;
> +   private HashCode treeHash;
> +
> +   public TreeHasher(Payload payload) throws IOException {
> +      this.payload = payload;
> +      this.buildHashes();

To @demobox's point, we could have a static method which returned a simple 
holder object for the two `HashCode`.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13791867

Reply via email to