title: What is the faster way to conver BigInteger to array of int?
body: <p>I have BigInt</p>
  
  <pre><code>BigInteger i = new BigInteger("5876934265987526278534978564378568734564937563487564327564376534875483753475");
  </code></pre>
  
  <p>I need to convert it to <code>[] int</code>. How can I do this fast?</p>
  
  <p>My method is very slow</p>
  
  <pre><code>private static int[] convertDigitsToIntArray(java.math.BigInteger x) {
      String s = x.toString();
      int[] result = new int[s.length()];
      for (int i = 0; i &lt; s.length(); i++) {
          result[i] = Integer.parseInt(String.valueOf(s.charAt(i)));
      }
      return result;
  }
  </code></pre>