Here you can find the source of byteToBitArray(byte b)
public static boolean[] byteToBitArray(byte b)
//package com.java2s; //License from project: Apache License public class Main { public static boolean[] byteToBitArray(byte b) { boolean[] buff = new boolean[8]; int index = 0; for (int i = 7; i >= 0; i--) { buff[index++] = ((b >>> i) & 1) == 1; }//from ww w .j av a 2 s. co m return buff; } }