Here you can find the source of toBinaryString(int[] input)
public static String toBinaryString(int[] input)
//package com.java2s; public class Main { public static String toBinaryString(int[] input) { String result = ""; int i;/*from w ww . java 2s .co m*/ for (i = 0; i < input.length; i++) { int e = input[i]; for (int ii = 0; ii < 32; ii++) { int b = (e >>> ii) & 1; result += b; } if (i != input.length - 1) { result += " "; } } return result; } }