List of utility methods to do Bits to String
String | bitsToString(boolean[] pBits) Converts a boolean[] to a String of 0's and 1's. String vString = ""; for (int i = 0; i < pBits.length; i++) { vString += (pBits[i] ? "1" : "0"); return vString; |
String | bitsToString(final int i) bits To String StringBuilder rValue = new StringBuilder(32); for (int j = 0; j < 32; ++j) { if ((i & (1 << (31 - j))) == 0) { rValue.append("0"); } else { rValue.append("1"); return rValue.toString(); |