Class PropertiesEncoder


  • public class PropertiesEncoder
    extends AbstractEncoder
    Encoder wraps properties and provide them decoded. Provided password and algorithm are used for decoding property values.
    Author:
    antons
    • Constructor Detail

      • PropertiesEncoder

        public PropertiesEncoder()
    • Method Detail

      • addProperties

        public void addProperties​(Properties props)
        Add another properties.
        Parameters:
        props - properties to add
      • addProperties

        public void addProperties​(InputStream propsis)
        Add another properties.
        Parameters:
        propsis - properties to add
      • getProperty

        public String getProperty​(String name)
        Reads propery and decode it if necessary
        Parameters:
        name - name of the properties
        Returns:
        decoded value for given property name
      • getProperty

        public String getProperty​(String name,
                                  String defaultValue)
        Reads property and decode it if necessary
        Parameters:
        name - name of the properties
        defaultValue - default value is provided property is not set
        Returns:
        decoded value for given property name
      • decode

        public Properties decode()
        Decodes all given properties and returns them decoded.
        Returns:
        Decoded properties