Code example for FileReader

Methods: close

0
    } 
 
    @Test 
    public void testPiglet() { 
        try { 
            FileReader in = new FileReader(file);
            try { 
                PigletCompiler c = new PigletCompiler();
 
                List<ASTNode> ast = c.parse(in);
                JobSpecification jobSpec = c.compile(ast);
 
                System.err.println(jobSpec.toJSON());
            } finally { 
                in.close();
            } 
        } catch (Exception e) {
            throw new RuntimeException(e);
        } 
    } 
}