cdac.medinfo.sdk.hl7282.utils

## Class PropertiesReader

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.utils.PropertiesReader

-     public class PropertiesReader
      extends java.lang.Object

  Reads values from properties file using the key. The Properties file should contain the key-value pair separated by "=".

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertiesReader()` Creates pre-initialized instance of PropertiesReader.
    `PropertiesReader(java.lang.String strPropertiesFile)` Creates pre-initialized instance of PropertiesReader using the Properties file path.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getProperty(java.lang.String strPropertyName)` Get properties from the Input Stream provided.
    `void` | `setPropertiesFile(java.io.InputStream objStream)` Loads properties from the Input Stream provided.
    `void` | `setPropertiesFile(java.lang.String strPropertiesFile)` Sets the properties file path and loads the properties from the file.
    `void` | `setPropertyValue(java.lang.String key, java.lang.String value)` Modify the value of key as set by the user and writes it in the property file.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PropertiesReader

          public PropertiesReader(java.lang.String strPropertiesFile)

      Creates pre-initialized instance of PropertiesReader using the Properties file path.
      Parameters:
        `strPropertiesFile` - Path of Properties File

    - #### PropertiesReader

          public PropertiesReader()

      Creates pre-initialized instance of PropertiesReader.

  - ### Method Detail

    - #### setPropertiesFile

          public void setPropertiesFile(java.lang.String strPropertiesFile)

      Sets the properties file path and loads the properties from the file.
      Parameters:
        `strPropertiesFile` - String value of properties complete file path.

    - #### setPropertiesFile

          public void setPropertiesFile(java.io.InputStream objStream)

      Loads properties from the Input Stream provided.
      Parameters:
        `objStream` - instance of Input Stream.

    - #### getProperty

          public java.lang.String getProperty(java.lang.String strPropertyName)

      Get properties from the Input Stream provided.
      Parameters:
        `strPropertyName` - the property key
      Returns:
        String - the value in this property list with the specified key value

    - #### setPropertyValue

          public void setPropertyValue(java.lang.String key,
                              java.lang.String value)

      Modify the value of key as set by the user and writes it in the property file.
      Parameters:
        `key` - the key in properties file.
        `value` - - the value which is to be set for the specified key.