Code example for FileReader

0
 */ 
public class Main { 
 
    public static void main(String[] args) {
        try { 
            FileReader reader = new FileReader(args[0]);
            IWikiParser parser = new CommonWikiParser();
            System.out.println("parser: " + parser.getClass().getName());
            IWikiPrinter printer = new WikiPrinter();
            IWemListener listener = new PrintListener(printer);
            parser.parse(reader, listener);
            System.out.println("RESULT: " + printer.toString());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (WikiParserException e) {
            e.printStackTrace();
        } 
    } 
}