Here you can find the source of clearBit(byte input, int bit)
public static byte clearBit(byte input, int bit)
//package com.java2s; //License from project: Apache License public class Main { private static final byte[] BYTE = new byte[] { -128, 64, 32, 16, 8, 4, 2, 1 }; public static byte clearBit(byte input, int bit) { return (byte) (input & ~BYTE[bit]); }/*from w ww. j a va 2s . c o m*/ }