CompositeReadableBuffer.append

Adds the given composite buffer contents (from current position, up to the limit) into this composite buffer at the end. The source buffer position will be set to its limit. <p> The appended buffer contents are not copied wherever possible, so changes to the source arrays are typically visible in this buffer and vice versa. Exceptions include where the source buffer position is not located at the start of its current backing array, or where the given buffer has a limit that doesn't encompass all of the last array used, and so the remainder of that arrays contents must be copied first to append here. <p> Calling this method resets the limit to the new _capacity.

@param buffer the buffer with contents to append into this composite buffer.

@throws IllegalArgumentException if the given buffer is null or has zero remainder. @throws IllegalStateException if the buffer does not allow appends.

@return a reference to this {@link CompositeReadableBuffer}.

  1. CompositeReadableBuffer append(byte[] array)
  2. CompositeReadableBuffer append(CompositeReadableBuffer buffer)
    class CompositeReadableBuffer
  3. CompositeReadableBuffer append(ReadableBuffer buffer)

Meta