> + 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);
`while(!q.isEmpty())` and use `{...}` around the body?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13790686