how can I use biginteger in java
<p>i have this code and i want to change it to BigInteger</p>

<pre><code>import java.util.*;
public class Euclid {
    long TIME;
    long start = System.currentTimeMillis();
    private static final String EXCEPTION_MSG = 
        "Invalid value (%d); only positive integers are allowed. ";

    public static int getGcd( int a, int b)

    {//long start = System.currentTimeMillis();
        if (a &lt; 0)
        {
            throw new IllegalArgumentException(String.format(EXCEPTION_MSG, a));
        }
        else 
            if (b &lt; 0) 
            { 
                throw new IllegalArgumentException(String.format(EXCEPTION_MSG, b));
            }

        while (b != 0)
        {               
            if (a &gt; b) 
            {
                a = a - b;
            }      
            else 
            {
                b = b - a;
            }    
        }
        return a;
        //long timeTaken = System.currentTimeMillis() - start;
    }
}
</code></pre>
