Hi, Thanks for the contribution ! keep up the good work. The CumulativeDecoder is a nice addition for the ones who will miss the old one and more in phase with the new codec API.
On the CumulativeByteBuffer, it's not that far of IoBuffer I don't think we should have two class and they should merge. If IoBuffer could discard byte, and provide byte iterator it would be fine for you ? BTW CumulativeDecoder should be in it's own package. Julien -- Julien Vermillard :::: http://people.apache.org/~jvermillard/ On Sat, Jun 15, 2013 at 11:42 AM, Raphaël Barazzutti <raphael.barazzu...@gmail.com> wrote: > Hi all, > > According to the helpful comment of Ashish (thanks!), I had to add a > cumulative mechanism in codec in order to have correct unserialization > in the Thrift module as well as in the Protobuf module. > > Look here : https://github.com/rbarazzutti/mina.git on branch > serialization-fixes-1 > > For this I implemented a class named CumulativeByteBuffer to handle > properly these accumulating needs in the decoding phase. > > Nevertheless another class, IoBuffer, is providing mechanisms close to > the one of CumulativeByteBuffer. IoBuffer has an API more similar to > the one of NIO's ByteBuffer, while CumulativeByteBuffer only provides > a subset of that API. IMHO, CumulativeByteBuffer is simpler and gives > some additional tools which are convenient for decoders. > > Ready for comments, > > Kind regards, > > Raphaël