@Test public void load() throws IOException { try { PropFiles.load(null, null); fail("Expecting a NullPointerException."); } catch (NullPointerException npe) { } try { PropFiles.load(null, null, false); fail("Expecting a NullPointerException."); } catch (NullPointerException npe) { } try { PropFiles.load(null, null, false, false); fail("Expecting a NullPointerException."); } catch (NullPointerException npe) { } try { PropFiles.load(null, null, null, false, false); fail("Expecting a NullPointerException."); } catch (NullPointerException npe) { } File tmp = File.createTempFile("test", "store"); PropFile props = new PropFile(Context.named("test"), PropFile.Loc.Local); long now = System.currentTimeMillis(); props.add("test", String.valueOf(now)); BufferedWriter writer = new BufferedWriter(new FileWriter(tmp)); PropFileWriter.Default.store(writer, props); writer.close(); PropFile loaded = new PropFile(Context.named("test"), PropFile.Loc.Local); assertTrue(PropFiles.load(tmp.getPath(), loaded, false, false)); assertEquals(now, (long) Long.valueOf(loaded.get("test").value())); loaded = new PropFile(Context.named("test"), PropFile.Loc.Local); assertFalse(PropFiles.load("not a file", loaded, false, false)); }
public static boolean load(String path, PropFile into) throws PropFileReader.Invalid { return load(path, PropFileReader.Default, into, false, true); }
PropFiles { public static boolean load(String path, PropFile into) throws PropFileReader.Invalid { return load(path, PropFileReader.Default, into, false, true); } }
PropFiles { public static boolean load(String path, PropFile into) throws PropFileReader.Invalid { return load(path, PropFileReader.Default, into, false, true); } private  PropFiles(); }
PropFiles { public static boolean load(String path, PropFile into) throws PropFileReader.Invalid { return load(path, PropFileReader.Default, into, false, true); } private  PropFiles(); static boolean load(String path, PropFile into); static boolean load(String path, PropFile into, boolean create); static boolean load(String path, PropFile into, boolean create, boolean printOnFNF); static PropFile load(String path, boolean create, boolean nullOnFNF); static boolean load(String path, PropFileReader propFileReader, PropFile into, boolean create, boolean printOnFNF); static boolean store(PropFile propFile, String to); static boolean store(PropFile propFile, String to, boolean create); static boolean store(PropFile propFile, PropFileWriter propFileWriter, String to, boolean create); static boolean store(PropFile propFile, PropFileWriter propFileWriter, String to,boolean create, boolean useFiltered); static String getFileName(PropFile propFile); }
PropFiles { public static boolean load(String path, PropFile into) throws PropFileReader.Invalid { return load(path, PropFileReader.Default, into, false, true); } private  PropFiles(); static boolean load(String path, PropFile into); static boolean load(String path, PropFile into, boolean create); static boolean load(String path, PropFile into, boolean create, boolean printOnFNF); static PropFile load(String path, boolean create, boolean nullOnFNF); static boolean load(String path, PropFileReader propFileReader, PropFile into, boolean create, boolean printOnFNF); static boolean store(PropFile propFile, String to); static boolean store(PropFile propFile, String to, boolean create); static boolean store(PropFile propFile, PropFileWriter propFileWriter, String to, boolean create); static boolean store(PropFile propFile, PropFileWriter propFileWriter, String to,boolean create, boolean useFiltered); static String getFileName(PropFile propFile);  }