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