@Override public int read(final byte[] bytes, final int off, final int len) throws IOException { final byte[] chunk = new byte[len]; final int read = buffer.read(chunk, offset); if(read > 0) { offset += read; System.arraycopy(chunk, 0, bytes, off, read); } return read; } }