// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package mapfile;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class Gen {
	private static final int SIZE = 1000000000;
	public static void main(String[] args) throws IOException {
		System.out.printf("%s %s / %s %s\n", System.getProperty("java.vendor"), System.getProperty("java.version"), System.getProperty("os.name"), System.getProperty("os.version"));
		long t1 = System.currentTimeMillis();
		try(PrintWriter pw = new PrintWriter(new FileWriter(args[0]))) {
			for(int i = 0; i < SIZE / 10; i++) {
				for(int j = 0; j < 10 - System.getProperty("line.separator").length(); j++) {
					pw.print(Integer.toString(i % 10));
				}
				pw.println();
			}
		}
		long t2 = System.currentTimeMillis();
		System.out.printf("Gen : %d ms\n", t2 - t1);
	}
}
