Code example for DataOutput

Methods: write

0
			writeRandom(stream, random, mainBuffer);
		writeRandom(stream, random, lastBuffer);
	} 
	private void writeRandom(DataOutput stream, Random random, byte[] buffer) throws IOException {
		random.nextBytes(buffer);
		stream.write(buffer);
	} 
	void read(RandomAccessFile file) throws IOException {
		for (int i = 0; i < fills; ++i)
			file.read(mainBuffer);
		file.read(lastBuffer);
	} 
}