/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }
/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }
/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }
/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }
/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }
/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }
/** * Constructs a new {@code BigInteger} from the given two's complement * representation. The most significant byte is the entry at index 0. The * most significant bit of this entry determines the sign of the new {@code * BigInteger} instance. The array must be nonempty. * * @param value two's complement representation of the new {@code * BigInteger}. * @throws NullPointerException if {@code value == null}. * @throws NumberFormatException if the length of {@code value} is zero. */ public BigInteger(byte[] value) { if (value.length == 0) { throw new NumberFormatException("value.length == 0"); } BigInt bigInt = new BigInt(); bigInt.putBigEndianTwosComplement(value); setBigInt(bigInt); }