> + ChunkedInputStreamEnumeration(InputStream inputStream, int
> chunkedBlockSize) {
> + this.inputStream = new BufferedInputStream(inputStream,
> chunkedBlockSize);
> + buffer = new byte[chunkedBlockSize];
> + lastChunked = false;
> + }
> +
> + @Override
> + public boolean hasMoreElements() {
> + return !lastChunked;
> + }
> +
> + @Override
> + public InputStream nextElement() {
> + int bytesRead;
> + try {
> + bytesRead = inputStream.read(buffer, 0, buffer.length);
Can also call `ByteStreams.readFully(InputStream, byte[])`.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/678/files#r30610288