Here you can find the source of bitsToString(final int i)
public static String bitsToString(final int i)
//package com.java2s; //License from project: LGPL public class Main { public static String bitsToString(final int i) { 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"); }// www . j a v a 2 s.com } return rValue.toString(); } }