code: public Document readDocumentFromFile(String filename) {
  
              ProvFormat format = getTypeForFile(filename);
              if (format == null) {
                  throw new InteropException("Unknown output file format: "
                          + filename);
              }
              return readDocumentFromFile(filename, format);
      }
docs: Reads a document from a file, using the file extension to decide which parser to read the file with.
  @param filename the file to read a document from
  @return a Document