Java examples for java.util:BitSet
BitSet To Char
//package com.java2s; import java.util.BitSet; public class Main { public static char bitSetToChar(BitSet bitSet) { char result = 0; for (int i = 0; i < bitSet.length(); i++) { if (bitSet.get(i)) { result |= (1 << i); }//from ww w . j a va 2 s.c om } result &= Character.MAX_VALUE; return result; } }