Java BigInteger to toIntArray(BigInteger[] input)

Here you can find the source of toIntArray(BigInteger[] input)

Description

Converts a BigInteger array into an integer array

License

Open Source License

Parameter

Parameter Description
input - the BigInteger array

Return

the integer array

Declaration

public static int[] toIntArray(BigInteger[] input) 

Method Source Code

//package com.java2s;
import java.math.BigInteger;

public class Main {
    /**/*from  w w w. j a  v a2s  . c  o m*/
     * Converts a BigInteger array into an integer array
     *
     * @param input -
     *              the BigInteger array
     * @return the integer array
     */
    public static int[] toIntArray(BigInteger[] input) {
        int[] result = new int[input.length];
        for (int i = 0; i < input.length; i++) {
            result[i] = input[i].intValue();
        }
        return result;
    }
}

Related

  1. toDecimal(BigInteger value, byte[] buffer, int offset, int length, int itemLength, byte pos)
  2. toEvenLengthHex(BigInteger value)
  3. toFixedLenByteArray(BigInteger x, int resultByteLen)
  4. toInt(BigInteger number)
  5. toInt(int length, BigInteger bi)
  6. toInteger(BigInteger bi)
  7. toInteger(BigInteger integer)
  8. toIntegerBytes(final BigInteger bigInt)
  9. toMinimalByteArray(BigInteger value)