Java examples for java.util:BitSet
Converts a BitSet to String
//package com.java2s; import java.util.BitSet; public class Main { /**//from w w w.j a va2s . c o m * Converts a BitSet to String * @param bits * @param length * @return */ public static String bitSetToString(BitSet bits, int length) { String sbits = ""; for (int i = length - 1; i >= 0; i--) sbits += (bits.get(i) ? "1" : "0"); return sbits; } }