Here you can find the source of toBit(byte value, int index)
private static boolean toBit(byte value, int index)
//package com.java2s; //License from project: Apache License public class Main { private static boolean toBit(byte value, int index) { return ((value >>> (7 - index)) & 1) > 0; }//from w w w .ja v a 2 s . co m }