public ResourceFormatGenerator getGeneratorForFileExtension ( final String extension ) throws UnsupportedFormatException { for ( final ResourceFormatGenerator generator : listGenerators ( ) ) { if ( generator . getFileExtensions ( ) . contains ( extension ) ) { return generator ; } } throw new UnsupportedFormatException ( "No provider available to parse file extension: " + extension ) ; }
Return a generator for a file based on the bare file extension .