Here you can find the source of bitSet(byte b, int pos)
public static byte bitSet(byte b, int pos)
//package com.java2s; //License from project: Apache License public class Main { public static byte bitSet(byte b, int pos) { return (byte) (b | (1 << pos)); }/*from w w w. j av a2 s.c om*/ }