private void reloadProperties ( ) { Properties temp = new Properties ( ) ; BufferedReader bufferedReader = null ; try { File properties = new File ( propertiesPath ) ; bufferedReader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( properties ) , "UTF8" ) ) ; temp . load ( bufferedReader ) ; this . properties = temp ; listeners . removeIf ( weakReference -> weakReference . get ( ) == null ) ; listeners . forEach ( weakReference -> { Consumer < PropertiesAssistant > consumer = weakReference . get ( ) ; if ( consumer != null ) consumer . accept ( this ) ; } ) ; } catch ( IOException e ) { error ( "Error while trying to load the Properties-File: " + propertiesPath , e ) ; } finally { if ( bufferedReader != null ) { try { bufferedReader . close ( ) ; } catch ( IOException e ) { error ( "Unable to close input stream" , e ) ; } } } }
reloads the propertiesFile into the properties object