I would like to make this piece of code faster. It returns all the factors (prime numbers) of a long number. It obviously takes minutes to be executed if the `longNumber` is a particular one.

```
int div = 2;
String factors = "";

while (longNumer != 1)
{
    if (longNumer % div == 0)
    {
        longNumer /= div;
        factors += div + " ";
    }
    else { div++; }
}

//longNumber = 10, gives: 2 5. 
//longNumber = 150, gives: 3 5 7.
//longNumber = 10523, gives: 17 619.

```

It takes too long with numbers such "7544222046562688368", and it's not good, what would you suggest?