Hi, How could I ignore the remained data in the ByteBuffer after finishing decoding the message?
I tried to do the thing below:
- Before decoding the ByteBuffer:
bufferSize = in.remaining();
- Then read and decode the ByteBuffer to high-level object:
doDecode();
- Set positon for ByteBuffer:
in.position(bufferSize);
But it did not work correctly.
Please advice me.
Thanks & best regards,
Hieu Phan.
