[freenet-dev] BitArray possible (little) bug?

2007-07-23 Thread bbac...@googlemail.com
> 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

[freenet-dev] BitArray possible (little) bug?

2007-07-23 Thread Alberto Bacchelli
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, writeToData

Re: [freenet-dev] BitArray possible (little) bug?

2007-07-23 Thread bbackde
> 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

Re: [freenet-dev] BitArray possible (little) bug?

2007-07-23 Thread Alberto Bacchelli
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, writeToData