On Monday 23 July 2007 09:45, [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> 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, [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote: > > > > [CUT] > > _______________________________________________ > > Devl mailing list > > [email protected] > > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
pgpFEiskXqSa9.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
