Package org.apache.qpid.protonj2.buffer
Class ProtonSlicedBuffer
- java.lang.Object
- 
- org.apache.qpid.protonj2.buffer.ProtonAbstractBuffer
- 
- org.apache.qpid.protonj2.buffer.ProtonSlicedBuffer
 
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<ProtonBuffer>,- ProtonBuffer
 
 public class ProtonSlicedBuffer extends ProtonAbstractBuffer Presents a sliced view of aProtonAbstractBuffer. The slice wraps the target buffer with a given offset into that buffer and a capped max capacity that limits how far into the wrapped buffer the slice will read or write. A sliced buffer does not allow capacity changes and as such any call to alter the capacity will result in anUnsupportedOperationException.
- 
- 
Field Summary- 
Fields inherited from class org.apache.qpid.protonj2.buffer.ProtonAbstractBuffermarkedReadIndex, markedWriteIndex, readIndex, writeIndex
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedProtonSlicedBuffer(ProtonAbstractBuffer buffer, int offset, int capacity)Creates a sliced view of the givenProtonByteBuffer.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcapacity()ProtonBuffercapacity(int newCapacity)Adjusts the capacity of this buffer.ProtonBuffercopy(int index, int length)Returns a copy of this buffer's sub-region.ProtonBufferduplicate()Create a duplicate of this ProtonBuffer instance that shares the same backing data store and but maintains separate position index values.byte[]getArray()Returns the backing array for this ProtonBuffer instance if there is such an array or throws an exception if this ProtonBuffer implementation has no backing array.intgetArrayOffset()booleangetBoolean(int index)Gets a boolean from the specified index, this method will not modify the read or write index.bytegetByte(int index)Gets a byte from the specified index, this method will not modify the read or write index.ProtonBuffergetBytes(int index, byte[] dst)Transfers this buffer's data to the specified destination starting at the specified absoluteindex.ProtonBuffergetBytes(int index, byte[] dst, int offset, int length)Transfers this buffer's data to the specified destination starting at the specified absoluteindex.ProtonBuffergetBytes(int index, java.nio.ByteBuffer destination)Transfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination's position reaches its limit.ProtonBuffergetBytes(int index, ProtonBuffer dst)Transfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination becomes non-writable.ProtonBuffergetBytes(int index, ProtonBuffer dst, int length)Transfers this buffer's data to the specified destination starting at the specified absoluteindex.ProtonBuffergetBytes(int index, ProtonBuffer dst, int dstIndex, int length)Transfers this buffer's data to the specified destination starting at the specified absoluteindex.chargetChar(int index)Gets a 2-byte char from the specified index, this method will not modify the read or write index.doublegetDouble(int index)Gets a double from the specified index, this method will not modify the read or write index.floatgetFloat(int index)Gets a float from the specified index, this method will not modify the read or write index.intgetInt(int index)Gets a int from the specified index, this method will not modify the read or write index.longgetLong(int index)Gets a long from the specified index, this method will not modify the read or write index.shortgetShort(int index)Gets a short from the specified index, this method will not modify the read or write index.shortgetUnsignedByte(int index)Gets a unsigned byte from the specified index, this method will not modify the read or write index.longgetUnsignedInt(int index)Gets a unsigned int from the specified index, this method will not modify the read or write index.intgetUnsignedShort(int index)Gets a unsigned short from the specified index, this method will not modify the read or write index.booleanhasArray()ProtonBuffersetBoolean(int index, boolean value)Sets the boolean value at the given write index in this buffer's backing data store.ProtonBuffersetByte(int index, int value)Sets the byte value at the given write index in this buffer's backing data store.ProtonBuffersetBytes(int index, byte[] source)Transfers the specified source array's data to this buffer starting at the specified absoluteindex.ProtonBuffersetBytes(int index, byte[] src, int srcIndex, int length)Transfers the specified source array's data to this buffer starting at the specified absoluteindex.ProtonBuffersetBytes(int index, java.nio.ByteBuffer source)Transfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer's position reaches its limit.ProtonBuffersetBytes(int index, ProtonBuffer source)Transfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer becomes unreadable.ProtonBuffersetBytes(int index, ProtonBuffer source, int length)Transfers the specified source buffer's data to this buffer starting at the specified absoluteindex.ProtonBuffersetBytes(int index, ProtonBuffer source, int sourceIndex, int length)Transfers the specified source buffer's data to this buffer starting at the specified absoluteindex.ProtonBuffersetChar(int index, int value)Sets the char value at the given write index in this buffer's backing data store.ProtonBuffersetDouble(int index, double value)Sets the double value at the given write index in this buffer's backing data store.ProtonBuffersetFloat(int index, float value)Sets the float value at the given write index in this buffer's backing data store.ProtonBuffersetInt(int index, int value)Sets the int value at the given write index in this buffer's backing data store.ProtonBuffersetLong(int index, long value)Sets the long value at the given write index in this buffer's backing data store.ProtonBuffersetShort(int index, int value)Sets the short value at the given write index in this buffer's backing data store.ProtonBufferslice(int index, int length)Create a new ProtonBuffer whose contents are a subsequence of the contents of thisProtonBuffer.java.nio.ByteBuffertoByteBuffer(int index, int length)Returns a ByteBuffer that represents the given span of bytes from the readable portion of this buffer.- 
Methods inherited from class org.apache.qpid.protonj2.buffer.ProtonAbstractBufferadjustIndexMarks, checkDestinationIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSourceIndex, clear, compareTo, copy, ensureWritable, equals, getMaxWritableBytes, getReadableBytes, getReadIndex, getWritableBytes, getWriteIndex, hashCode, isOutOfBounds, isReadable, isReadable, isWritable, isWritable, markReadIndex, markWriteIndex, maxCapacity, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readDouble, readFloat, readInt, readLong, readShort, resetReadIndex, resetWriteIndex, setIndex, setReadIndex, setWriteIndex, skipBytes, slice, toByteBuffer, toString, toString, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeDouble, writeFloat, writeInt, writeLong, writeShort
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.qpid.protonj2.buffer.ProtonBufferunwrap
 
- 
 
- 
- 
- 
Constructor Detail- 
ProtonSlicedBufferprotected ProtonSlicedBuffer(ProtonAbstractBuffer buffer, int offset, int capacity) Creates a sliced view of the givenProtonByteBuffer.- Parameters:
- buffer- The buffer that this slice is a view of.
- offset- The offset into the buffer where this view starts.
- capacity- The amount of the buffer that this view spans.
 
 
- 
 - 
Method Detail- 
hasArraypublic boolean hasArray() - Returns:
- true if this buffer has a backing byte array that can be accessed.
 
 - 
getArraypublic byte[] getArray() Description copied from interface:ProtonBufferReturns the backing array for this ProtonBuffer instance if there is such an array or throws an exception if this ProtonBuffer implementation has no backing array.Changes to the returned array are visible to other users of this ProtonBuffer. - Returns:
- the backing byte array for this ProtonBuffer.
 
 - 
getArrayOffsetpublic int getArrayOffset() - Returns:
- the offset of the first byte in the backing array belonging to this buffer.
 
 - 
capacitypublic int capacity() - Returns:
- the number of bytes this buffer can currently contain.
 
 - 
capacitypublic ProtonBuffer capacity(int newCapacity) Description copied from interface:ProtonBufferAdjusts the capacity of this buffer. If the new capacity is less than the current capacity, the content of this buffer is truncated. If the new capacity is greater than the current capacity, the buffer is appended with unspecified data whose length is new capacity - current capacity.- Parameters:
- newCapacity- the new maximum capacity value of this buffer.
- Returns:
- this buffer for using in call chaining.
 
 - 
duplicatepublic ProtonBuffer duplicate() Description copied from interface:ProtonBufferCreate a duplicate of this ProtonBuffer instance that shares the same backing data store and but maintains separate position index values. Changes to one buffer are visible in any of its duplicates. This method does not copy the read or write markers to the new buffer instance.- Specified by:
- duplicatein interface- ProtonBuffer
- Overrides:
- duplicatein class- ProtonAbstractBuffer
- Returns:
- a new ProtonBuffer instance that shares the backing data as this one.
 
 - 
slicepublic ProtonBuffer slice(int index, int length) Description copied from interface:ProtonBufferCreate a new ProtonBuffer whose contents are a subsequence of the contents of thisProtonBuffer.The starting point of the new buffer starts at given index into this buffer and spans the number of bytes given by the length. Changes to the contents of this buffer or to the produced slice buffer are visible in the other. - Specified by:
- slicein interface- ProtonBuffer
- Overrides:
- slicein class- ProtonAbstractBuffer
- Parameters:
- index- The index in this buffer where the slice should begin.
- length- The number of bytes to make visible to the new buffer from this one.
- Returns:
- a new ProtonBufferwhose contents are a subsequence of this buffer.
 
 - 
copypublic ProtonBuffer copy(int index, int length) Description copied from interface:ProtonBufferReturns a copy of this buffer's sub-region. Modifying the content of the returned buffer or this buffer does not affect each other at all. This method does not modify the value returned fromProtonBuffer.getReadIndex()orProtonBuffer.getWriteIndex()of this buffer.- Specified by:
- copyin interface- ProtonBuffer
- Specified by:
- copyin class- ProtonAbstractBuffer
- Parameters:
- index- The index in this buffer where the copy should begin
- length- The number of bytes to copy to the new buffer from this one.
- Returns:
- a new ProtonBuffer instance containing the copied bytes.
 
 - 
toByteBufferpublic java.nio.ByteBuffer toByteBuffer(int index, int length)Description copied from interface:ProtonBufferReturns a ByteBuffer that represents the given span of bytes from the readable portion of this buffer.This method should attempt to return a ByteBuffer that shares the backing data store with this buffer however if that is not possible it is permitted that the returned ByteBuffer contain a copy of the readable bytes of this ProtonBuffer. - Specified by:
- toByteBufferin interface- ProtonBuffer
- Specified by:
- toByteBufferin class- ProtonAbstractBuffer
- Parameters:
- index- The starting index in this where the ByteBuffer view should begin.
- length- The number of bytes to include in the ByteBuffer view.
- Returns:
- a ByteBuffer that represents the given view of this buffers readable bytes.
 
 - 
getBooleanpublic boolean getBoolean(int index) Description copied from interface:ProtonBufferGets a boolean from the specified index, this method will not modify the read or write index.- Specified by:
- getBooleanin interface- ProtonBuffer
- Overrides:
- getBooleanin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getBytepublic byte getByte(int index) Description copied from interface:ProtonBufferGets a byte from the specified index, this method will not modify the read or write index.- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getUnsignedBytepublic short getUnsignedByte(int index) Description copied from interface:ProtonBufferGets a unsigned byte from the specified index, this method will not modify the read or write index.- Specified by:
- getUnsignedBytein interface- ProtonBuffer
- Overrides:
- getUnsignedBytein class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getCharpublic char getChar(int index) Description copied from interface:ProtonBufferGets a 2-byte char from the specified index, this method will not modify the read or write index.- Specified by:
- getCharin interface- ProtonBuffer
- Overrides:
- getCharin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getShortpublic short getShort(int index) Description copied from interface:ProtonBufferGets a short from the specified index, this method will not modify the read or write index.- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getUnsignedShortpublic int getUnsignedShort(int index) Description copied from interface:ProtonBufferGets a unsigned short from the specified index, this method will not modify the read or write index.- Specified by:
- getUnsignedShortin interface- ProtonBuffer
- Overrides:
- getUnsignedShortin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getIntpublic int getInt(int index) Description copied from interface:ProtonBufferGets a int from the specified index, this method will not modify the read or write index.- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getUnsignedIntpublic long getUnsignedInt(int index) Description copied from interface:ProtonBufferGets a unsigned int from the specified index, this method will not modify the read or write index.- Specified by:
- getUnsignedIntin interface- ProtonBuffer
- Overrides:
- getUnsignedIntin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getLongpublic long getLong(int index) Description copied from interface:ProtonBufferGets a long from the specified index, this method will not modify the read or write index.- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getFloatpublic float getFloat(int index) Description copied from interface:ProtonBufferGets a float from the specified index, this method will not modify the read or write index.- Specified by:
- getFloatin interface- ProtonBuffer
- Overrides:
- getFloatin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getDoublepublic double getDouble(int index) Description copied from interface:ProtonBufferGets a double from the specified index, this method will not modify the read or write index.- Specified by:
- getDoublein interface- ProtonBuffer
- Overrides:
- getDoublein class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- Returns:
- the value read from the given index.
 
 - 
getBytespublic ProtonBuffer getBytes(int index, ProtonBuffer dst) Description copied from interface:ProtonBufferTransfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination becomes non-writable. This method is basically same withProtonBuffer.getBytes(int, ProtonBuffer, int, int), except that this method increases thewriteIndexof the destination by the number of the transferred bytes whileProtonBuffer.getBytes(int, ProtonBuffer, int, int)does not. This method does not modifyreadIndexorwriteIndexof the source buffer (i.e.this).- Specified by:
- getBytesin interface- ProtonBuffer
- Overrides:
- getBytesin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- dst- the destination buffer for the bytes to be read
- Returns:
- this buffer for chaining
 
 - 
getBytespublic ProtonBuffer getBytes(int index, ProtonBuffer dst, int length) Description copied from interface:ProtonBufferTransfers this buffer's data to the specified destination starting at the specified absoluteindex. This method is basically same withProtonBuffer.getBytes(int, ProtonBuffer, int, int), except that this method increases thewriteIndexof the destination by the number of the transferred bytes whileProtonBuffer.getBytes(int, ProtonBuffer, int, int)does not. This method does not modifyreadIndexorwriteIndexof the source buffer (i.e.this).- Specified by:
- getBytesin interface- ProtonBuffer
- Overrides:
- getBytesin class- ProtonAbstractBuffer
- Parameters:
- index- the index in the buffer to start the read from
- dst- the destination buffer for the bytes to be read
- length- the number of bytes to transfer
- Returns:
- this buffer for chaining
 
 - 
getBytespublic ProtonBuffer getBytes(int index, ProtonBuffer dst, int dstIndex, int length) Description copied from interface:ProtonBufferTransfers this buffer's data to the specified destination starting at the specified absoluteindex. This method does not modifyreadIndexorwriteIndexof both the source (i.e.this) and the destination.- Parameters:
- index- The index into the buffer where the value should be read.
- dst- The buffer where the bytes read will be written to
- dstIndex- The offset into the destination where the write starts
- length- The number of bytes to transfer
- Returns:
- this buffer for chaining
 
 - 
getBytespublic ProtonBuffer getBytes(int index, byte[] dst) Description copied from interface:ProtonBufferTransfers this buffer's data to the specified destination starting at the specified absoluteindex. This method does not modifyreadIndexorwriteIndexof this buffer- Specified by:
- getBytesin interface- ProtonBuffer
- Overrides:
- getBytesin class- ProtonAbstractBuffer
- Parameters:
- index- The index into the buffer where the value should be read.
- dst- The buffer where the bytes read will be written to
- Returns:
- this buffer for chaining
 
 - 
getBytespublic ProtonBuffer getBytes(int index, byte[] dst, int offset, int length) Description copied from interface:ProtonBufferTransfers this buffer's data to the specified destination starting at the specified absoluteindex. This method does not modify#getReadIndex()or#getWriteIndex()of this buffer.- Parameters:
- index- The index into the buffer where the value should be read.
- dst- The buffer where the bytes read will be written to
- offset- the offset into the destination to begin writing the bytes.
- length- the number of bytes to transfer from this buffer to the target buffer.
- Returns:
- this buffer for chaining
 
 - 
getBytespublic ProtonBuffer getBytes(int index, java.nio.ByteBuffer destination) Description copied from interface:ProtonBufferTransfers this buffer's data to the specified destination starting at the specified absoluteindexuntil the destination's position reaches its limit. This method does not modify#getReadIndex()or#getWriteIndex()of this buffer while the destination'spositionwill be increased.- Parameters:
- index- The index into the buffer where the value should be read.
- destination- The buffer where the bytes read will be written to
- Returns:
- this buffer for chaining
 
 - 
setBytepublic ProtonBuffer setByte(int index, int value) Description copied from interface:ProtonBufferSets the byte value at the given write index in this buffer's backing data store.- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setBooleanpublic ProtonBuffer setBoolean(int index, boolean value) Description copied from interface:ProtonBufferSets the boolean value at the given write index in this buffer's backing data store.- Specified by:
- setBooleanin interface- ProtonBuffer
- Overrides:
- setBooleanin class- ProtonAbstractBuffer
- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setCharpublic ProtonBuffer setChar(int index, int value) Description copied from interface:ProtonBufferSets the char value at the given write index in this buffer's backing data store.- Specified by:
- setCharin interface- ProtonBuffer
- Overrides:
- setCharin class- ProtonAbstractBuffer
- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setShortpublic ProtonBuffer setShort(int index, int value) Description copied from interface:ProtonBufferSets the short value at the given write index in this buffer's backing data store.- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setIntpublic ProtonBuffer setInt(int index, int value) Description copied from interface:ProtonBufferSets the int value at the given write index in this buffer's backing data store.- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setLongpublic ProtonBuffer setLong(int index, long value) Description copied from interface:ProtonBufferSets the long value at the given write index in this buffer's backing data store.- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setFloatpublic ProtonBuffer setFloat(int index, float value) Description copied from interface:ProtonBufferSets the float value at the given write index in this buffer's backing data store.- Specified by:
- setFloatin interface- ProtonBuffer
- Overrides:
- setFloatin class- ProtonAbstractBuffer
- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setDoublepublic ProtonBuffer setDouble(int index, double value) Description copied from interface:ProtonBufferSets the double value at the given write index in this buffer's backing data store.- Specified by:
- setDoublein interface- ProtonBuffer
- Overrides:
- setDoublein class- ProtonAbstractBuffer
- Parameters:
- index- The index to start the write from.
- value- The value to write at the given index.
- Returns:
- a reference to this ProtonBuffer for chaining.
 
 - 
setBytespublic ProtonBuffer setBytes(int index, ProtonBuffer source) Description copied from interface:ProtonBufferTransfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer becomes unreadable. This method is basically same withProtonBuffer.setBytes(int, ProtonBuffer, int, int), except that this method increases thereadIndexof the source buffer by the number of the transferred bytes whileProtonBuffer.setBytes(int, ProtonBuffer, int, int)does not. This method does not modifyreadIndexorwriteIndexof the source buffer (i.e.this).- Specified by:
- setBytesin interface- ProtonBuffer
- Overrides:
- setBytesin class- ProtonAbstractBuffer
- Parameters:
- index- The index in this buffer where the write operation starts.
- source- The source buffer from which the bytes are read.
- Returns:
- this buffer for chaining
 
 - 
setBytespublic ProtonBuffer setBytes(int index, ProtonBuffer source, int length) Description copied from interface:ProtonBufferTransfers the specified source buffer's data to this buffer starting at the specified absoluteindex. This method is basically same withProtonBuffer.setBytes(int, ProtonBuffer, int, int), except that this method increases thereadIndexof the source buffer by the number of the transferred bytes whileProtonBuffer.setBytes(int, ProtonBuffer, int, int)does not. This method does not modifyreadIndexorwriteIndexof the source buffer (i.e.this).- Specified by:
- setBytesin interface- ProtonBuffer
- Overrides:
- setBytesin class- ProtonAbstractBuffer
- Parameters:
- index- The index in this buffer where the write operation starts.
- source- The source buffer from which the bytes are read.
- length- The number of bytes to transfer
- Returns:
- this buffer for chaining
 
 - 
setBytespublic ProtonBuffer setBytes(int index, ProtonBuffer source, int sourceIndex, int length) Description copied from interface:ProtonBufferTransfers the specified source buffer's data to this buffer starting at the specified absoluteindex. This method does not modifyreadIndexorwriteIndexof both the source (i.e.this) and the destination.- Parameters:
- index- The index in this buffer where the write operation starts.
- source- The source buffer from which the bytes are read.
- sourceIndex- The offset into the source where the set begins.
- length- The number of bytes to transfer
- Returns:
- this buffer for chaining
 
 - 
setBytespublic ProtonBuffer setBytes(int index, byte[] source) Description copied from interface:ProtonBufferTransfers the specified source array's data to this buffer starting at the specified absoluteindex. This method does not modifyreadIndexorwriteIndexof this buffer.- Specified by:
- setBytesin interface- ProtonBuffer
- Overrides:
- setBytesin class- ProtonAbstractBuffer
- Parameters:
- index- The index in this buffer where the write operation starts.
- source- The source buffer from which the bytes are read.
- Returns:
- this buffer for chaining
 
 - 
setBytespublic ProtonBuffer setBytes(int index, byte[] src, int srcIndex, int length) Description copied from interface:ProtonBufferTransfers the specified source array's data to this buffer starting at the specified absoluteindex. This method does not modifyreadIndexorwriteIndexof this buffer.- Parameters:
- index- The index in this buffer where the write operation starts.
- src- The source buffer from which the bytes are read.
- srcIndex- The offset into the source where the set begins.
- length- The number of bytes to transfer
- Returns:
- this buffer for chaining
 
 - 
setBytespublic ProtonBuffer setBytes(int index, java.nio.ByteBuffer source) Description copied from interface:ProtonBufferTransfers the specified source buffer's data to this buffer starting at the specified absoluteindexuntil the source buffer's position reaches its limit. This method does not modifyreadIndexorwriteIndexof this buffer.- Parameters:
- index- The index in this buffer where the write operation starts.
- source- The source buffer from which the bytes are read.
- Returns:
- this buffer for chaining
 
 
- 
 
-