public static byte[] randomBytes(int size) {
        byte[] bytes = new byte[size];

        for (int index = 0; index < size; index++) {
            bytes[index] = (byte) randomNumber(0, 255);
        }

        return bytes;
    }
public static byte [ ] randomBytes ( int size ) { byte [ ] bytes = new byte [ size ] ; for ( int index = 0 ; index < size ; index ++ ) { bytes [ index ] = ( byte ) randomNumber ( 0 , 255 ) ; } return bytes ; }
Creates an arbitrary number of random bytes

@param size the number of random bytes to create
@return An array of random bytes