Converted from BitSet to int[].