ByteBuf.writeBytes

Transfers the specified source array's data to this buffer starting at the current {@code writerIndex} and increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}). If {@code this.writableBytes} is less than {@code length}, {@link #ensureWritable(int)} will be called in an attempt to expand capacity to accommodate.

@param srcIndex the first index of the source @param length the number of bytes to transfer

@throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0}, or if {@code srcIndex + length} is greater than {@code src.length}

Meta