> 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
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
> 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
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