code: public short shortValueExact() {
         long num;
         num = this.longValueExact();     // will check decimal part
         if ((short)num != num)
             throw new java.lang.ArithmeticException("Overflow");
         return (short)num;
      }
docs: Converts this {@code BigDecimal} to a {@code short}, checking
  for lost information.  If this {@code BigDecimal} has a
  nonzero fractional part or is out of the possible range for a
  {@code short} result then an {@code ArithmeticException} is
  thrown.
  
  @return this {@code BigDecimal} converted to a {@code short}.
  @throws ArithmeticException if {@code this} has a nonzero
  fractional part, or will not fit in a {@code short}.
  @since  1.5