No, Trustin. I was asking about actually how Mina handle this internally?
Too lazy to read the source code.^^

On 10/2/07, Trustin Lee <[EMAIL PROTECTED]> wrote:
>
> On 10/2/07, mat <[EMAIL PROTECTED]> wrote:
> > After MessageDecoderResult.OK in decode(), what mina handle ByteBuffer
> > in? Remove the remaining byte[] in ByteBuffer to new position? Or
> ByteBuffer
> > has special function can do this?
>
> It often retains the reference to the buffer calling compact() and
> flip().  It sometimes replaces the buffer received from the previous
> filter in the chain.  It's because the decoder implementation is
> optimized to minimize memory copy.  So you can't assume about its
> internal behavior.  Please do not try to modify the content of the
> buffer (e.g. calling buffer.compact()); MINA will do that for you.
> Plus, please do not assume that the buffer's position is always 0.  It
> can vary depending on situation.
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Reply via email to