@andrewgaul
> Can you write this with Guava ByteStreams.limit? This avoids the extra copy 
> in memory.

This might be doable, but I'm not sure how it would look.

It's not enough to simply return a wrapped `InputStream`, because you still 
need a way of paging through the streamed data.  You could pass the overall 
content length into the iterators ctor, and page by chunk size, but there is no 
way to guarantee that `next()` is only ever called _after_  reading exactly a 
chunk length's worth of data from the underlying stream.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/192#issuecomment-30185543

Reply via email to