Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 84472 invoked from network); 5 Dec 2005 13:58:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 13:58:16 -0000 Received: (qmail 61105 invoked by uid 500); 5 Dec 2005 13:58:15 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 61048 invoked by uid 500); 5 Dec 2005 13:58:15 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 61037 invoked by uid 99); 5 Dec 2005 13:58:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 05:58:14 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.18.242.163] (HELO mail.cellectivity.com) (212.18.242.163) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 05:58:14 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5F9A3.E1EA2AB9" Subject: [MINA] Another useful shortcut Date: Mon, 5 Dec 2005 13:57:51 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [MINA] Another useful shortcut thread-index: AcX5o+Ih/i7bNDxORpSbozRmXfU71Q== From: "Jose Alberto Fernandez" To: "Apache Directory Developers List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C5F9A3.E1EA2AB9 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 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: =20 Boolean enoughAvailable(int prefixSizeLength)=20 =20 This may be very useful on many protocols that provide a size header in front of variable data being sent. =20 Jose Alberto =20 ------_=_NextPart_001_01C5F9A3.E1EA2AB9 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

------_=_NextPart_001_01C5F9A3.E1EA2AB9--