Generate a string of random characters in Java
From https://gist.github.com/imrichardcole/5731570