BigInteger.byteValueExact

Converts this {@code BigInteger} to a {@code byte}, checking for lost information. If the value of this {@code BigInteger} is out of the range of the {@code byte} type, then an {@code ArithmeticException} is thrown.

@return this {@code BigInteger} converted to a {@code byte}. @throws ArithmeticException if the value of {@code this} will not exactly fit in a {@code byte}. @see BigInteger#byteValue

class BigInteger
byte
byteValueExact
()

Meta