This simple main program looks after filenames and
opening files and such like for you.
Filter o = new Filter();
if (av.length == 0) {
o.process("standard input", new LineNumberReader(
new InputStreamReader(System.in)));
} else {
for (int i=0; i<av.length; i++)
try {
o.process(av[i],
new LineNumberReader(new FileReader(av[i])));
} catch (FileNotFoundException e) {
System.err.println(e);
}
}