Here you can find the source of bigIntegerToDigits(BigInteger n)
public static int[] bigIntegerToDigits(BigInteger n)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; public class Main { public static int[] bigIntegerToDigits(BigInteger n) { String s = n.toString();/*w w w. ja v a2 s . c o m*/ int size = s.length(); int[] retval = new int[size]; for (int i = 0; i < size; i++) { retval[i] = Integer.parseInt(String.valueOf(s.charAt(i))); } return retval; } }