Class PropertiesTransformer

Object
PropertiesTransformer

public class PropertiesTransformer extends Object
Utility class for converting between Properties objects and alternative representations such as Map or flat key–value strings.
  • Constructor Details

    • PropertiesTransformer

      public PropertiesTransformer()
  • Method Details

    • propertiesToMap

      public static Map<String,Object> propertiesToMap(Properties props)
      Converts a Properties object into a Map representation.
    • propertiesToString

      public static String propertiesToString(Properties props)
      Serializes a Properties object into a semicolon-delimited key=value string.
    • paramsStringToProperties

      public static Properties paramsStringToProperties(String paramsText) throws IOException
      Parses an encoded parameter string into a Properties object.
      Throws:
      IOException
    • loadProperties

      public static void loadProperties(String params, Properties properties) throws IOException
      Loads key–value pairs from raw text into a Properties object after normalization.
      Throws:
      IOException
    • normalizePropertiesString

      public static String normalizePropertiesString(String raw)
      Normalizes raw property text into a clean, loadable format.