Class PropertiesToYamlExtensions


  • public class PropertiesToYamlExtensions
    extends java.lang.Object
    The class PropertiesToYamlExtensions provides methods for convert properties to yaml files
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void toYamlFile​(@NonNull java.io.File propertiesFile, @NonNull java.io.File newYamlFileToWrite)
      Converts the given properties file to a given new yaml file
      static java.lang.String toYamlString​(@NonNull java.io.File propertiesFile)
      Converts the given properties file to a yaml string
      static java.lang.String toYamlString​(@NonNull java.lang.String propertiesFilename)
      Resolves the properties file from the given file name and converts it to a yaml string
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertiesToYamlExtensions

        public PropertiesToYamlExtensions()
    • Method Detail

      • toYamlString

        public static java.lang.String toYamlString​(@NonNull
                                                    @NonNull java.io.File propertiesFile)
        Converts the given properties file to a yaml string
        Parameters:
        propertiesFile - the properties file
        Returns:
        the yaml string
      • toYamlString

        public static java.lang.String toYamlString​(@NonNull
                                                    @NonNull java.lang.String propertiesFilename)
        Resolves the properties file from the given file name and converts it to a yaml string
        Parameters:
        propertiesFilename - the properties filename
        Returns:
        the yaml string
      • toYamlFile

        public static void toYamlFile​(@NonNull
                                      @NonNull java.io.File propertiesFile,
                                      @NonNull
                                      @NonNull java.io.File newYamlFileToWrite)
                               throws java.io.IOException
        Converts the given properties file to a given new yaml file
        Parameters:
        propertiesFile - the properties file
        newYamlFileToWrite - the new yaml file to write
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred