Java Bit Clean clearBit(byte input, int bit)

Here you can find the source of clearBit(byte input, int bit)

Description

clear Bit

License

Apache License

Declaration

public static byte clearBit(byte input, int bit) 

Method Source Code

//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*/
}

Related

  1. clearBit(byte b, int i)
  2. clearBit(byte v, int position)
  3. clearBit(int bits, int index)
  4. clearBit(int flag, int i)
  5. clearBit(int n, int bitPosition)