Here you can find the source of resetBit(byte b, int bit)
public static byte resetBit(byte b, int bit)
//package com.java2s; //License from project: Open Source License public class Main { public static byte resetBit(byte b, int bit) { if (bit < 0 || bit >= 8) return b; return (byte) (b & (~(1 << bit))); }/*from w w w .j a v a 2 s .c om*/ }