ByteBuf.setBytes
- ByteBuf setBytes(int index, ByteBuf src)
- ByteBuf setBytes(int index, ByteBuf src, int length)
- ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)
- ByteBuf setBytes(int index, byte[] src)
- ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)
- ByteBuf setBytes(int index, ByteBuffer src)
- int setBytes(int index, InputStream inStream, int length)
Transfers the content of the specified source stream to this buffer starting at the specified absolute {@code index}. This method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
@param length the number of bytes to transfer
@return the actual number of bytes read in from the specified channel. {@code -1} if the specified channel is closed.
@throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if {@code index + length} is greater than {@code this.capacity} @throws IOException if the specified stream threw an exception during I/O