public static < T > T loadConfigurationModel ( Class < T > clzz , String configurationFileLocation ) { System . out . println ( "Loading config file " + configurationFileLocation ) ; InputStream fileContents = null ; try { fileContents = getRequiredResourceAsStream ( configurationFileLocation ) ; return Jackson . load ( clzz , fileContents ) ; } catch ( IOException e ) { System . err . println ( "Failed to read the configuration file " + configurationFileLocation ) ; throw new RuntimeException ( e ) ; } finally { if ( fileContents != null ) { Utils . closeQuietly ( fileContents ) ; } } }
Deserialize the contents of a given configuration file .