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 ( ) ) ; } }
Return a parser for a file based on the file extension .