Here you can find the source of toBits(int b)
public final static String toBits(int b)
//package com.java2s; //License from project: Open Source License public class Main { public final static String toBits(int b) { return Integer.toBinaryString(b).replace(' ', '0'); }/*from w w w.j av a 2s . c o m*/ }