Here you can find the source of fillBuffer(ByteBuffer buffer, int seed)
public static final void fillBuffer(ByteBuffer buffer, int seed)
//package com.java2s; import java.nio.ByteBuffer; import java.util.Random; public class Main { public static final void fillBuffer(ByteBuffer buffer, int seed) { Random rnd = new Random(seed); while (buffer.remaining() != 0) buffer.putInt(rnd.nextInt()); buffer.rewind();/* w ww . j a v a 2 s .c o m*/ } }