Here you can find the source of intToBool(int int_in, int length)
public static Boolean[] intToBool(int int_in, int length)
//package com.java2s; //License from project: Open Source License public class Main { public static Boolean[] intToBool(int int_in, int length) { Boolean[] boolarray_out = new Boolean[length]; for (int ii = 0; ii < length; ii++) { boolarray_out[ii] = ((int_in % 2) == 1); }/*from w ww. jav a 2 s. c o m*/ return boolarray_out; } public static Boolean[] intToBool(int int_in) { // TODO: If this gets a value too large, it won't work! return intToBool(int_in, (int) Math.floor(Math.log(int_in))); } }