public class MadkitProperties
extends java.util.Properties
| Modifier and Type | Field and Description |
|---|---|
static boolean |
JAVAWS_IS_ON
Shortcut for System.getProperty("javawebstart.version") !
|
| Constructor and Description |
|---|
MadkitProperties() |
| Modifier and Type | Method and Description |
|---|---|
static java.io.InputStream |
getInputStream(java.lang.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(java.lang.String pathname)
Loads properties from a properties file (classic or XML).
|
void |
loadPropertiesFromMaDKitXML(java.lang.String filePath)
Loads properties from an XML file.
|
void |
loadPropertiesFromPropertiesFile(java.lang.String pathname)
Loads properties from a regular properties formatted file.
|
java.lang.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(java.lang.String filePath)
throws java.io.IOException
filePath - can be absolute or relativejava.io.IOExceptionpublic void loadPropertiesFromPropertiesFile(java.lang.String pathname)
throws java.io.IOException
pathname - java.io.IOExceptionpublic void loadPropertiesFromFile(java.lang.String pathname)
throws java.io.IOException
pathname - java.io.IOExceptionpublic static java.io.InputStream getInputStream(java.lang.String pathname)
throws java.io.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.java.lang.NullPointerExceptionjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.util.Hashtable<java.lang.Object,java.lang.Object>
Fabien Michel, Olivier Gutknecht, Jacques Ferber - September 9 2019