Here you can find the source of generateRandomBytes(final int pSize)
public static final byte[] generateRandomBytes(final int pSize)
//package com.java2s; import java.util.Random; public class Main { /** Common random instance for generating common tag names. */ public final static Random random = new Random(123l); /**/* w ww .j a v a 2 s .c o m*/ * Generating random bytes. * * @return the random bytes */ public static final byte[] generateRandomBytes(final int pSize) { final byte[] returnVal = new byte[pSize]; random.nextBytes(returnVal); return returnVal; } }