> +         is = payload.openStream();
> +         Queue<HashCode> q = Lists.newLinkedList();
> +         HashingInputStream linearHis = new 
> HashingInputStream(Hashing.sha256(), is);
> +         while (true) {
> +             HashingInputStream chunkedHis = new HashingInputStream(
> +                     Hashing.sha256(), ByteStreams.limit(linearHis, 
> CHUNK_SIZE));
> +             long count = ByteStreams.copy(chunkedHis, 
> ByteStreams.nullOutputStream());
> +             if (count == 0) {
> +                 break;
> +             }
> +             q.offer(chunkedHis.hash());
> +         }
> +
> +         //Rehash the queue until its size is 1.
> +         while (q.size() > 1)
> +            q = hashQueue(q);

Do we actually use an `Queue` methods or would a `Collection`/`ArrayList` work 
as well?

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

Reply via email to