Here you can find the source of bitIsSet(byte data, byte bit)
public static boolean bitIsSet(byte data, byte bit)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean bitIsSet(byte data, byte bit) { return getBitValue(data, bit) != 0; }/*from www . ja va2s. c om*/ public static int getBitValue(byte data, byte bit) { return (data & (1 << bit)) > 0 ? 1 : 0; } }