public static int getBit(int v, int position) {
        return (v & (1 << position)) >>> position;
    }
Returns v, with the bit at position set to 1 or 0 depending on value.
commons-server/src/main/java/com/navercorp/pinpoint/common/server/util/BitFieldUtils.java