Package madkit.kernel

Class MadkitProperties

All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class MadkitProperties extends Properties
The properties object used within MaDKit.
Since:
MadKit 5.0.2
Version:
0.91
Author:
Fabien Michel
See Also:
  • Field Details

    • JAVAWS_IS_ON

      public static final boolean JAVAWS_IS_ON
      Shortcut for System.getProperty("javawebstart.version") != null;
  • Constructor Details

    • MadkitProperties

      public MadkitProperties()
  • Method Details

    • loadPropertiesFromMaDKitXML

      public void loadPropertiesFromMaDKitXML(String filePath) throws IOException
      Loads properties from an XML file.
      Parameters:
      filePath - can be absolute or relative
      Throws:
      IOException
    • loadPropertiesFromPropertiesFile

      public void loadPropertiesFromPropertiesFile(String pathname) throws IOException
      Loads properties from a regular properties formatted file.
      Parameters:
      pathname -
      Throws:
      IOException
    • loadPropertiesFromFile

      public void loadPropertiesFromFile(String pathname) throws IOException
      Loads properties from a properties file (classic or XML).
      Parameters:
      pathname -
      Throws:
      IOException
    • getInputStream

      public static InputStream getInputStream(String pathname) throws IOException
      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. The returned input stream should be closed once done.
      Parameters:
      pathname - A pathname string If the pathname argument is null
      Returns:
      an InputStream by opening a connection to an actual file, or null if the file is not found.
      Throws:
      NullPointerException
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Properties