Here you can find the source of bitArrayToUnsignedBigInteger(int[] bits)
public static BigInteger bitArrayToUnsignedBigInteger(int[] bits)
//package com.java2s; import java.math.*; public class Main { public static BigInteger bitArrayToUnsignedBigInteger(int[] bits) { BigInteger result = BigInteger.ZERO; for (int i = 0; i < bits.length; i++) if (bits[i] == 1) result = result.setBit(i); return result; }/* w ww .j ava 2s . c om*/ }