Hi Jose,

2005/12/6, Jose Alberto Fernandez <[EMAIL PROTECTED]>:

Hi Trustin,

You are correct. But maybe then, some way to peek at the value (without moving the reading position) would do.

Something like:

    int peekInt()

    short peekShort()

    etc.

This will resolve most of the nasty part and allow people to check for denials as well.


Instead, I added prefixedDataAvailable() to ByteBuffer.  You'll find out this method is really useful for your use case.  There are two prefixedDataAvailable(); one with maxDataLength parameter, and the other without it.  It is up to you which method you're going to use, but I recommend the former.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to