/** * Reads and returns the stored Properties, usually from a file. * @return {@link Properties} * @throws FileNotFoundException * @throws Exception * @throws IOException */ protected Properties readPropertiesFromStore() throws FileNotFoundException, IOException { Properties ret; // Todo: Which class loader to use? library service unavailable, because it depends on settings service? File file = getFile(filename); FileInputStream fis = new FileInputStream(file.exists() ? file : getFile("default"+SETTINGS_EXTENSION)); ret = (Properties)PropertiesXMLHelper.read(fis, getClass().getClassLoader()); fis.close(); return ret; }
protected void proceed(File file) { FileInputStream fis = null; try { fis = new FileInputStream(file); Properties props = (Properties)PropertiesXMLHelper.read(fis, getClass().getClassLoader()); ret.setResult(props); } catch(Exception e) { ret.setException(e); } finally { if(fis!=null) { try { fis.close(); } catch(Exception e) { } } } } });
protected void proceed(File file) { FileInputStream fis = null; try { fis = new FileInputStream(file); Properties props = (Properties)PropertiesXMLHelper.read(fis, getClass().getClassLoader()); ret.setResult(props); } catch(Exception e) { ret.setException(e); } finally { if(fis!=null) { try { fis.close(); } catch(Exception e) { } } } } });
filename += ".launch.xml"; FileInputStream is = new FileInputStream(new File(filename)); final Properties props = (Properties)PropertiesXMLHelper.read(is, getClass().getClassLoader()); is.close();
props = (Properties)PropertiesXMLHelper.read(fis, cl); fis.close();
props = (Properties)PropertiesXMLHelper.read(fis, cl); fis.close();