Hi,
yes, it's normal.
Grizzly Buffer may wrap a ByteBuffer with a specific offset or just a
part of ByteBuffer (view), which you have to consider.
Normally when you do toByteBuffer() - the returned ByteBuffer's position
and limit will represent current Grizzly Buffer's view.
WBR,
Alexey.
On 27.11.14 08:12, Евгений Бушуев wrote:
> Hi!
>
> Is it legal for a org.glassfish.grizzly.Buffer
> (org.glassfish.grizzly.memory.HeapMemoryManager.TrimmableHeapBuffer#TrimmableHeapBuffer)
> to return ByteBuffer from its toByteBuffer method so that ByteBuffer's
> content won't be same as in original grizzly.Buffer?
>
> Can't figure out why this happens, seems to be random.
> The grizzly.Buffer instance is not composite.
>
> Best regards, Eugene.