code: public static CompilationUnit parse(File file, String encoding) throws ParseException, IOException {
          Reader reader = new InputStreamReader(new FileInputStream(file), encoding);
          CompilationUnit cu = parse(reader);
          cu.setURI(file.toURI());
          return cu;
      }
docs: Parses a Java source file with a given encoding and store the AST into a
  {@link org.walkmod.javalang.ast.CompilationUnit} object.
  
  @param file
  source code to parse
  @param encoding
  @return the abstract syntax tree (AST)
  @throws ParseException
  when the code contains an invalid syntax
  @throws IOException
  file can not be read.