public static ConfigSyntax syntaxFromExtension ( String filename ) { if ( filename == null ) return null ; else if ( filename . endsWith ( ".json" ) ) return ConfigSyntax . JSON ; else if ( filename . endsWith ( ".conf" ) ) return ConfigSyntax . CONF ; else if ( filename . endsWith ( ".properties" ) ) return ConfigSyntax . PROPERTIES ; else return null ; }
Guess configuration syntax from given filename .