A few Java functions to generate random data.