On Monday 23 July 2007 09:45, bbackde at googlemail.com wrote:
> > setAllOnes() to set all bits true,
>
> maybe use BitSet.set(int fromIndex, int toIndex) with fromIndex=0 and
> toIndex=BitSet.size()
>
> > firstOne() to find the first true bit,
>
> maybe use BitSet.nextSetBit(0)
>
> > writeToDataOutputStream()
>
> BitSet is already Serializable. But maybe you need to reimplement it
> to keep compatability to the current serialization code.

We don't want to use java's Serialization for this; we need an efficient 
binary format for Message's, not a universal object stream.
>
> > hashCode()
>
> isn't this implemented already in BitSet.hashCode() ?
>
> On 7/23/07, Alberto Bacchelli <sback at sback.it> wrote:
> > I surveyed BitArray class to check whether it is possible to delete it
> > in favor of BitSet.
> >
> > IMHO we could dismiss BitArray, but we should extend the existing
> > java.util.BitSet class to provide some methods missing:
> > setAllOnes() to set all bits true,
> > firstOne() to find the first true bit,
> > writeToDataOutputStream()
> > hashCode()
> > unsignedByte() [STATIC method]
> > I don't think it would be difficult to create them.
> >
> > On the other hand, maybe it could be knotty to substitute
> > serializedLength() method which has only one reference.
> >
> > Matthew Toseland wrote:
> > > On Thursday 12 July 2007 13:19, bbackde at googlemail.com wrote:
> > >> Slightly off topic question: why don't you use the existing
> > >> java.util.BitSet? This seems to work for me in Frost.
> > >
> > > IIRC we needed some extra methods. Somebody should check into this.
> > >
> > >> On 7/12/07, Sback <sback at sback.it> wrote:
> >
> > [CUT]
> > _______________________________________________
> > Devl mailing list
> > Devl at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20070724/39a57e9c/attachment.pgp>

Reply via email to