code: public static HashSet<Character> toCharacterSet(String src) {
      int n = src.length();
      HashSet<Character> res = new HashSet<>(n);
      for (int i = 0; i < n; i++)
        res.add(src.charAt(i));
      return res;
    }
  
    public static Character[] toCharacterArray(String src) {
      return ArrayUtils.box(src.toCharArray());
    }
  
    public static int unhex(String str) {
      int res = 0;
      for (char c : str.toCharArray()) {
        if (!hexCode.containsKey(c)) throw new NumberFormatException("Not a hexademical character " + c);
        res = (res << 4) + hexCode.get(c);
      }
      return res;
    }
  
    public static byte[] bytesOf(CharSequence str) {
      return str.toString().getBytes(Charset.forName("UTF-8"));
    }
  
    public static byte[] toBytes(Object value) {
      return bytesOf(String.valueOf(value));
    }
    
    public static String toString(byte[] bytes, int from, int length) {
      return new String(bytes, from, length, Charset.forName("UTF-8"));
    }
  }
docs: Convert a string into the set of its characters.
  
  @param src Source string
  @return Set of characters within the source string