Java Bit Value Set bitSet(byte b, int pos)

Here you can find the source of bitSet(byte b, int pos)

Description

bit Set

License

Apache License

Declaration

public static byte bitSet(byte b, int pos) 

Method Source Code

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

Related

  1. bit_marker_geohash(String attribute, int bit, boolean on)
  2. bitIsSet(byte data, byte bit)
  3. bitIsSet(int i, int offset)
  4. bitIsSet(int x, int pos)
  5. bitIsSet(long value, long test)
  6. bitSet(int value, int bitmask)
  7. bitSet(long holder, int i, boolean set)