protonj2/src/main/java/org/apache/qpid/protonj2/buffer/impl/ProtonCompositeBufferImpl.java [347:370]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (offset < 0) {
            throw generateIndexOutOfBounds(offset, false);
        }
        if (offset + length > capacity) {
            throw generateIndexOutOfBounds(offset + length, false);
        }

        int lastAccessedChunk = findChunkWithIndex(offset);

        while (length > 0) {
            final ProtonBuffer buffer = buffers[lastAccessedChunk];
            final int readBytes = Math.min(buffer.getReadableBytes(), length);

            buffer.copyInto(offset - startIndices[lastAccessedChunk], destination, destOffset, readBytes);

            offset += readBytes;
            length -= readBytes;
            destOffset += readBytes;

            lastAccessedChunk++;
        }
    }

    @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



protonj2/src/main/java/org/apache/qpid/protonj2/buffer/impl/ProtonCompositeBufferImpl.java [380:403]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (offset < 0) {
            throw generateIndexOutOfBounds(offset, false);
        }
        if (offset + length > capacity) {
            throw generateIndexOutOfBounds(offset + length, false);
        }

        int lastAccessedChunk = findChunkWithIndex(offset);

        while (length > 0) {
            final ProtonBuffer buffer = buffers[lastAccessedChunk];
            final int readBytes = Math.min(buffer.getReadableBytes(), length);

            buffer.copyInto(offset - startIndices[lastAccessedChunk], destination, destOffset, readBytes);

            offset += readBytes;
            length -= readBytes;
            destOffset += readBytes;

            lastAccessedChunk++;
        }
    }

    @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



