public static BigInteger[] convertListToArray(List<BigInteger> list){
  BigInteger[] result=new BigInteger[list.size()];
  for (int i=0; i < list.size(); i++) {
    result[i]=list.get(i);
  }
  return result;
}

public static BigInteger [ ] convertListToArray ( List < BigInteger > list ) { BigInteger [ ] result = new BigInteger [ list . size ( ) ] ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { result [ i ] = list . get ( i ) ; } return result ; }
converts a list of bigintegers to an array
