Java examples for File Path IO:Byte Array
unset Bit on byte value
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { byte b = 2; int pos = 2; System.out.println(unsetBit(b, pos)); }/* w ww.ja va 2 s . c om*/ /** * * @param b * @param pos * @return */ public static byte unsetBit(byte b, int pos) { return (byte) (b & ~(1 << pos)); } }