public DiffElement createDiffableFromFile(File file, int maxElementsToRead) { DiffableReader reader = findReaderForFile(file); if (reader == null) throw new UserException("Unsupported file type: " + file); else return reader.readFromFile(file, maxElementsToRead); }