public class MadkitProperties extends Properties
| Modifier and Type | Field and Description |
|---|---|
static boolean |
JAVAWS_IS_ON
Shortcut for System.getProperty("javawebstart.version") !
|
defaults| Constructor and Description |
|---|
MadkitProperties() |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
getInputStream(String pathname)
Return an
InputStream on a file. pathname could be relative to (1) the actual MaDKit class path, which
is preferable considering jar export, or (2) the user.dir, or it could be an absolute path. |
void |
loadPropertiesFromFile(String pathname)
Loads properties from a properties file (classic or XML).
|
void |
loadPropertiesFromMaDKitXML(String filePath)
Loads properties from an XML file.
|
void |
loadPropertiesFromPropertiesFile(String pathname)
Loads properties from a regular properties formatted file.
|
String |
toString() |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamesclear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, valuespublic static final boolean JAVAWS_IS_ON
public void loadPropertiesFromMaDKitXML(String filePath) throws IOException
filePath - can be absolute or relativeIOExceptionpublic void loadPropertiesFromPropertiesFile(String pathname) throws IOException
pathname - IOExceptionpublic void loadPropertiesFromFile(String pathname) throws IOException
pathname - IOExceptionpublic static InputStream getInputStream(String pathname) throws IOException
InputStream on a file. pathname could be relative to (1) the actual MaDKit class path, which
is preferable considering jar export, or (2) the user.dir, or it could be an absolute path. The returned input stream
should be closed once done.pathname - A pathname string If the pathname argument is nullInputStream by opening a connection to an actual file, or null if the file is
not found.NullPointerExceptionIOException
Fabien Michel, Olivier Gutknecht, Jacques Ferber - February 17 2020