Java BigInteger to bigIntegerToDigits(BigInteger n)

Here you can find the source of bigIntegerToDigits(BigInteger n)

Description

big Integer To Digits

License

Open Source License

Declaration

public static int[] bigIntegerToDigits(BigInteger n) 

Method Source Code

//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;
    }
}

Related

  1. bigIntegerToBytes(BigInteger b, int numBytes)
  2. bigIntegerToBytes(BigInteger b, int numBytes)
  3. bigIntegerToBytes(BigInteger integer)
  4. bigIntegerToBytes(BigInteger n, byte[] data, int[] offset)
  5. bigIntegerToBytes(final BigInteger bigInteger)
  6. BigIntegerToEightBytes(BigInteger value)
  7. bigIntegerToHex(final BigInteger bigInteger)
  8. bigIntegerToList(BigInteger number)
  9. bigIntegerToString(final BigInteger value)