Here you can find the source of getBooleans(byte[] bytes, int length)
public static boolean[] getBooleans(byte[] bytes, int length)
//package com.java2s; public class Main { public static boolean[] getBooleans(byte[] bytes, int length) { boolean[] booleans = new boolean[length]; for (int i = 0; i < length; i++) { final int word = i >>> 3; booleans[i] = (bytes[word] & (1 << (i & 7))) != 0; }/*from ww w . ja v a2s . co m*/ return booleans; } }