Is there something in j2se or Jakarta commons thats converts a number to an array of digits?
<p>I hate to code what is already available. I can't seem to find in Jakarta commons a method that would to the following:</p>

<pre><code>long x= 12345;
int[] digits = toDigitsArray(x); //[1,2,3,4,5]
</code></pre>

<p>So before I code my own toDigitsArray() method does anyone know if the equivalent exists either in j2se or in commons?</p>
