directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject [MINA] Another useful shortcut
Date Mon, 05 Dec 2005 13:57:51 GMT
Hi,

 

Now that we have support for length prefixed strings, it would be nice
to have an easy way to ask if the ByteBuffer has available (remaining)
an amount specified by a byte/short/int without needing to read the
value, check if there is enough, rewind and wait for more to come.
Something like:

 

            Boolean enoughAvailable(int prefixSizeLength) 

 

This may be very useful on many protocols that provide a size header in
front of variable data being sent.

 

Jose Alberto

 


Mime
View raw message