BigInteger.this

Translates the sign-magnitude representation of a BigInteger into a BigInteger. The sign is represented as an integer signum value: -1 for negative, 0 for zero, or 1 for positive. The magnitude is a sub-array of a byte array in <i>big-endian</i> byte-order: the most significant byte is the element at index {@code off}. A zero value of the length {@code len} is permissible, and will result in a BigInteger value of 0, whether signum is -1, 0 or 1. The {@code magnitude} array is assumed to be unchanged for the duration of the constructor call.

An {@code IndexOutOfBoundsException} is thrown if the length of the array {@code magnitude} is non-zero and either {@code off} is negative, {@code len} is negative, or {@code off+len} is greater than the length of {@code magnitude}.

@param signum signum of the number (-1 for negative, 0 for zero, 1 for positive). @param magnitude big-endian binary representation of the magnitude of the number. @param off the start offset of the binary representation. @param len the number of bytes to use. @throws NumberFormatException {@code signum} is not one of the three legal values (-1, 0, and 1), or {@code signum} is 0 and {@code magnitude} contains one or more non-zero bytes. @throws IndexOutOfBoundsException if the provided array offset and length would cause an index into the byte array to be negative or greater than or equal to the array length.

Meta