New constructor that takes an InputStream as parameter
for files that are embedded within a zip file
This commit is contained in:
parent
bdf416d1c6
commit
e944ba1a3b
1 changed files with 14 additions and 0 deletions
|
@ -27,6 +27,20 @@ public final class SystemProperties extends Properties {
|
|||
this (null, null);
|
||||
}
|
||||
|
||||
public SystemProperties (InputStream in) {
|
||||
this (null, null);
|
||||
try {
|
||||
load (in);
|
||||
} catch (Exception x) {
|
||||
IServer.getLogger().log ("Error reading properties from file "+file+": "+x);
|
||||
} finally {
|
||||
try {
|
||||
in.close ();
|
||||
} catch (Exception ignore) {}
|
||||
}
|
||||
lastread = System.currentTimeMillis ();
|
||||
}
|
||||
|
||||
public SystemProperties (String filename) {
|
||||
this (filename, null);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue