private void load ( ) throws IOException { if ( PrivilegedFileHelper . exists ( storage ) ) { InputStream in = PrivilegedFileHelper . fileInputStream ( storage ) ; try { Properties props = new Properties ( ) ; log . debug ( "loading namespace mappings..." ) ; props . load ( in ) ; // read mappings from properties Iterator < Object > iter = props . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String prefix = ( String ) iter . next ( ) ; String uri = props . getProperty ( prefix ) ; log . debug ( prefix + " -> " + uri ) ; prefixToURI . put ( prefix , uri ) ; uriToPrefix . put ( uri , prefix ) ; } prefixCount = props . size ( ) ; log . debug ( "namespace mappings loaded." ) ; } finally { in . close ( ) ; } } }
Loads currently known mappings from a . properties file .