Transfers the content of the specified stream to this buffer
starting at the current {@code writerIndex} and increases the
{@code writerIndex} by the number of the transferred bytes.
If {@code this.writableBytes} is less than {@code length}, {@link #ensureWritable(int)}
will be called in an attempt to expand capacity to accommodate.
@param length the number of bytes to transfer
@return the actual number of bytes read in from the specified stream
@throws IOException if the specified stream threw an exception during I/O
Transfers the content of the specified stream to this buffer starting at the current {@code writerIndex} and increases the {@code writerIndex} by the number of the transferred bytes. If {@code this.writableBytes} is less than {@code length}, {@link #ensureWritable(int)} will be called in an attempt to expand capacity to accommodate.
@param length the number of bytes to transfer
@return the actual number of bytes read in from the specified stream
@throws IOException if the specified stream threw an exception during I/O