Here you can find the source of bitStr(long value)
public static String bitStr(long value)
//package com.java2s; //License from project: Open Source License public class Main { public static String bitStr(long value) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < Long.SIZE; i++) { buf.append((value & 0x01) + ""); value >>= 1;// ww w.ja v a 2 s .c o m } buf.reverse(); return buf.toString(); } }