edu.northwestern.at.utils

## Class UTF8PropertyUtils

- java.lang.Object
- - edu.northwestern.at.utils.UTF8PropertyUtils

-     public class UTF8PropertyUtils
      extends java.lang.Object

  Read and write UTF8 properties files.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `UTF8PropertyUtils()` Don't allow instantiation, do allow overrides.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UTF8Properties` | `loadUTF8Properties(java.lang.String propertiesFileName)` Load properties from a specified file.
    `static UTF8Properties` | `loadUTF8Properties(java.net.URL propertiesURL)` Load properties from a specified URL.
    `static UTF8Properties` | `loadUTF8Properties(java.net.URL propertiesURL, UTF8Properties defaultProperties)` Load properties from a specified URL and default properties.
    `static UTF8Properties` | `loadUTF8PropertiesFromString(java.lang.String propertiesString)` Load properties from a string.
    `static void` | `saveUTF8Properties(UTF8Properties properties, java.lang.String propertiesFileName, java.lang.String header)` Save properties to a specified file.
    `static void` | `saveUTF8PropertiesToString(UTF8Properties properties, java.lang.String propertiesString, java.lang.String header)` Saves properties to a specified string.

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

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

- - ### Constructor Detail

    - #### UTF8PropertyUtils

          protected UTF8PropertyUtils()

      Don't allow instantiation, do allow overrides.

  - ### Method Detail

    - #### loadUTF8Properties

          public static UTF8Properties loadUTF8Properties(java.lang.String propertiesFileName)
                                                   throws java.io.IOException,
                                                          java.io.FileNotFoundException

      Load properties from a specified file.
      Parameters:
        `propertiesFileName` - File name of properties file to read.
      Returns:
        UTF8Properties object with keys and values as read from properties file.
      Throws:
        `java.io.FileNotFoundException` - if properties file not found.
        `java.io.IOException` - if properties file cannot be read.

    - #### loadUTF8Properties

          public static UTF8Properties loadUTF8Properties(java.net.URL propertiesURL)
                                                   throws java.io.IOException,
                                                          java.io.FileNotFoundException

      Load properties from a specified URL.
      Parameters:
        `propertiesURL` - URL of properties file to read.
      Returns:
        UTF8Properties object with keys and values as read from properties URL.
      Throws:
        `java.io.IOException` - if properties file cannot be read.
        `java.io.FileNotFoundException`

    - #### loadUTF8Properties

          public static UTF8Properties loadUTF8Properties(java.net.URL propertiesURL,
                                          UTF8Properties defaultProperties)
                                                   throws java.io.IOException,
                                                          java.io.FileNotFoundException

      Load properties from a specified URL and default properties.
      Parameters:
        `propertiesURL` - URL of properties file to read.
        `defaultProperties` - Default properties.
      Returns:
        UTF8Properties object with keys and values as read from properties URL overriding those loaded from default properties.
      Throws:
        `java.io.IOException` - if properties file cannot be read.
        `java.io.FileNotFoundException`

    - #### saveUTF8Properties

          public static void saveUTF8Properties(UTF8Properties properties,
                                java.lang.String propertiesFileName,
                                java.lang.String header)
                                         throws java.io.IOException

      Save properties to a specified file.
      Parameters:
        `properties` - UTF8Properties collection to save.
        `propertiesFileName` - Name of file to save to.
        `header` - Header line describing properties.
      Throws:
        `java.io.IOException` - if properties file cannot be saved.

    - #### loadUTF8PropertiesFromString

          public static UTF8Properties loadUTF8PropertiesFromString(java.lang.String propertiesString)
                                                             throws java.io.IOException

      Load properties from a string.
      Parameters:
        `propertiesString` - String containing properties to read.
      Returns:
        UTF8Properties object with keys and values as read from properties string.
      Throws:
        `java.io.IOException` - if properties cannot be read from string.

    - #### saveUTF8PropertiesToString

          public static void saveUTF8PropertiesToString(UTF8Properties properties,
                                        java.lang.String propertiesString,
                                        java.lang.String header)
                                                 throws java.io.IOException

      Saves properties to a specified string.
      Parameters:
        `properties` - -- properties collection to save.
        `header` - -- header line describing properties.
      Throws:
        `java.io.IOException` - if properties cannot be saved to string.