Class PropertiesConfigurationFileFormat

  • All Implemented Interfaces:
    io.confound.config.file.ConfigurationFileFormat

    public class PropertiesConfigurationFileFormat
    extends java.lang.Object
    implements io.confound.config.file.ConfigurationFileFormat
    File format implementation for a configuration stored in standard properties format, using the UTF-8 charset by default, or any UTF-* encoding (including UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE) for which a Byte Order Mark (BOM) is present.

    This implementation recognizes files with the extension suffix "properties".

    Author:
    Garret Wilson
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String EXTENSION_SUFFIX
      The supported extension suffix.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getFilenameExtensionSuffixes()  
      io.confound.config.Configuration load​(java.io.InputStream inputStream, io.confound.config.Configuration parentConfiguration)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.confound.config.file.ConfigurationFileFormat

        load
    • Field Detail

      • EXTENSION_SUFFIX

        public static final java.lang.String EXTENSION_SUFFIX
        The supported extension suffix.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PropertiesConfigurationFileFormat

        public PropertiesConfigurationFileFormat()
    • Method Detail

      • getFilenameExtensionSuffixes

        public java.util.Set<java.lang.String> getFilenameExtensionSuffixes()
        Specified by:
        getFilenameExtensionSuffixes in interface io.confound.config.file.ConfigurationFileFormat
      • load

        public io.confound.config.Configuration load​(java.io.InputStream inputStream,
                                                     io.confound.config.Configuration parentConfiguration)
                                              throws java.io.IOException
        Specified by:
        load in interface io.confound.config.file.ConfigurationFileFormat
        Throws:
        java.nio.charset.CharacterCodingException - if the given input stream contains an invalid byte sequence for the charset indicated by the BOM; or if no BOM was present, an invalid byte sequence for the UTF-8 charset.
        java.io.IOException