code: public ResourceFormatParser getParserForFileExtension(final File file) throws UnsupportedFormatException {
          String extension = getFileExtension(file.getName());
          if (null != extension) {
              return getParserForFileExtension(extension);
          } else {
              throw new UnsupportedFormatException("Could not determine format for file: " + file.getAbsolutePath());
          }
      }
docs: Return a parser for a file, based on the file extension.
  
  @param file the file
  
  @return the parser found for the extension
  
  @throws UnsupportedFormatException if the file extension does not match an available parser, or if the file has
  no extension