Class ConfigReader

java.lang.Object
org.jcsp.net.settings.ConfigReader
All Implemented Interfaces:
XMLConfigConstants

public class ConfigReader extends Object implements XMLConfigConstants

Used internally by the JCSP network infrastructure to load a configuration from an XML file.

This is not a full XML reader, and is capable of reading only a subset of XML.

Author:
Quickstone Technologies Limited
  • Constructor Details

    • ConfigReader

      public ConfigReader(InputStream instream) throws IOException
      Constructs a new configuration from the given source stream. This will attempt to parse the file using recursive-descent approach.
      Parameters:
      instream - source of the XML configuration.
      Throws:
      IOException - if there is a problem with the stream or the file is improperly formatted.
      ConfigReader.XMLValidationException - if there is a symantic problem with the configuration.
  • Method Details

    • main

      public static void main(String[] args)
      Diagnostic routine. This can load an XML configuration file and then display the configuration structure constructed. Specify the name of the file as the first command line parameter.
    • getConfig

      public JCSPConfig getConfig()