public void nextBytes(byte[] bytes){
  final int length=bytes.length;
  for (int i=0; i < length; ) {
    for (int rnd=nextInt(), n=Math.min(length - i,INTEGER_SIZE / BYTE_SIZE); n-- > 0; rnd>>=BYTE_SIZE) {
      bytes[i++]=(byte)rnd;
    }
  }
}

public void nextBytes ( byte [ ] bytes ) { final int length = bytes . length ; for ( int i = 0 ; i < length ; ) { for ( int rnd = nextInt ( ) , n = Math . min ( length - i , INTEGER_SIZE / BYTE_SIZE ) ; n -- > 0 ; rnd >>= BYTE_SIZE ) { bytes [ i ++ ] = ( byte ) rnd ; } } }
fill a specified byte array with random bytes
