Faster RandomAccessFile

I'm trying to write about 50MB of integers into a binary file using something like this:

for (int j = 0; j<mySize; j++){

myBinaryFile.writeInt(myArray[mySize]);

}

However, this is painfully slow. The 50MB file took around 5 minutes to complete. Is there a faster way? A buffered RandomAccessFile?>

[335 byte] By [Big_Ducka] at [2007-11-26 22:47:33]
# 1
You can try to see if a DataOutputStream wrapped around a BufferedOutputStream is any faster.
jsalonena at 2007-7-10 12:06:33 > top of Java-index,Java Essentials,Java Programming...
# 2
Thanks. I'll give it a try.
Big_Ducka at 2007-7-10 12:06:33 > top of Java-index,Java Essentials,Java Programming...