import java.io.*; // boring java code that uses the RandomAccessFile class to make // some large (empty) text files 1.txt, 2.txt,..., and sets their // file sizes to erm, a big number. The text files are roughly 2gb-ish. // credits: arup ghose, james warren 2006 public class MakeFiles { public static void main(String argv[]){ MakeFiles m = new MakeFiles(); m.messWithFileSize(); } public void messWithFileSize() { try{ //create 5 files, each 2 gigs-ish String temp = ""; for (int i = 1; i <= 5; i++) { temp = i + ".txt"; FileWriter fstream = new FileWriter(temp); BufferedWriter b = new BufferedWriter(fstream); b.write("Hello I am a file"); //Close the output stream b.close(); RandomAccessFile f = new RandomAccessFile(temp,"rw"); f.writeChars("test"); f.setLength((long)(Integer.MAX_VALUE)); } } catch(IOException ioe) {} } }