Class WriteBytesToFile


  • public class WriteBytesToFile
    extends 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 Detail

      • WriteBytesToFile

        public WriteBytesToFile()
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws 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:
        IOException - If unable to write to output file