In Java, you can use a SecureRandom to generate cryptographically secure data. If you only need to generate the data one time, then it would be simple enough to use the following:
RandomDataGenerator.java
public static void main(String args[]) {
SecureRandom random = new SecureRandom();
byte bytes[] = new byte[262144]; // Number of bytes in 0.25MB
random.nextBytes(bytes);
try {
FileOutputStream fos = new FileOutputStream("random.data");
fos.write(myByteArray);
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
Let me know if you have any problems getting this to work.