public List < LanguageProfile > read ( ClassLoader classLoader , String profileDirectory , Collection < String > profileFileNames ) throws IOException { List < LanguageProfile > loaded = new ArrayList <> ( profileFileNames . size ( ) ) ; for ( String profileFileName : profileFileNames ) { String path = makePathForClassLoader ( profileDirectory , profileFileName ) ; try ( InputStream in = classLoader . getResourceAsStream ( path ) ) { if ( in == null ) { throw new IOException ( "No language file available named " + profileFileName + " at " + path + "!" ) ; } loaded . add ( read ( in ) ) ; } } return loaded ; }
Load profiles from the classpath in a specific directory .