dk.netarkivet.common.tools
Class WriteBytesToFile

java.lang.Object
  extended by dk.netarkivet.common.tools.WriteBytesToFile

public class WriteBytesToFile
extends java.lang.Object

A class with a method for creating large files. Bruce Eckel's solution (http://www.java2s.com/ExampleCode/File-Input-Output/Creatingaverylargefileusingmapping.htm) is slightly slower!


Constructor Summary
WriteBytesToFile()
           
 
Method Summary
static void main(java.lang.String[] args)
          Writes a large number of bytes to a given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteBytesToFile

public WriteBytesToFile()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Writes a large number of bytes to a given file.

Parameters:
args - args[0] is the number of bytes to write args[1] the name of the output file
Throws:
java.io.IOException - If unable to write to output file