Converts this Buffer
to a {@link ByteBuffer}. If this Buffer
is not composite - then returned {@link ByteBuffer}'s content is a shared subsequence of this buffer's content, with {@link CompositeBuffer} this is not guaranteed.The position of the returned {@link ByteBuffer} is not guaranteed to be 0,the capacity of the returned {@link ByteBuffer} is not guaranteed to beequal to the capacity of this Buffer
. It is guaranteed that the result of the returned ByteBuffer's {@link ByteBuffer#remaining()} call will be equal to this Buffer's{@link #remaining()} call.The Buffer's and ByteBuffer's position, limit, and mark values are not guaranteed to be independent, so it's recommended to save and restore position, limit values if it is planned to change them or {@link ByteBuffer#slice()} the returned {@link ByteBuffer}.
Buffer
as a {@link ByteBuffer}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|