code: public char charValue() throws OtpErlangRangeException {
          final long l = longValue();
          final char i = (char) l;
  
          if (i != l) {
              throw new OtpErlangRangeException("Value too large for char: "
                      + val);
          }
  
          return i;
      }
docs: Get this number as a char.
  
  @return the char value of this number.
  
  @exception OtpErlangRangeException
  if the value is too large to be represented as a char.