List of utility methods to do Bit Unset
void | unset(byte[] bytes) Unset an array of bytes. for (int i = 0; i < bytes.length; i++) { bytes[i] = 0; |
int | unsetb(int num, int bitmask) unsetb if (bset(num, bitmask)) num -= bitmask; return num; |
void | UnsetBit(byte _bitset, byte bit) Unset Bit _bitset &= Byte.valueOf(bit); |
byte | unsetBit(byte b, int pos) unset Bit return (byte) (b & ~(1 << pos)); |
byte | unsetBit(byte original, int bitToUnSet) Sets a bit to zero in a byte then returns new byte return (byte) (original & ~(1 << bitToUnSet)); |
byte[] | unsetBit(byte[] b, int index) Sets the bit at the specified index of b to 0. int maxIndex = b.length * 8 - 1; if ((index < 0) || (index > maxIndex)) { throw new IndexOutOfBoundsException( "Invalid bit index: " + index + " for " + b.length + "-byte array."); int byteOffset = b.length - (index / 8) - 1; int bitOffset = index % 8; byte mask = (byte) ~(0xFF & (1 << bitOffset)); ... |
int | unsetBit(int f, int i) unset Bit int k = (1 << i); if (f % (2 * k) >= k) { return f - k; return f; |
int | unSetBit(int integer, int bit) un Set Bit return (integer & ~(1 << bit));
|
int | unsetBit(int value, int flags) Unset bits for value using 'bitwise and' operation and return modified value. return value &= flags;
|
long | unsetBit(long flags, long bit) Unset a bit or bit combination from bitmap return flags & ~bit;
|