Class Sanitizers


  • public class Sanitizers
    extends Object
    Provides the most commonly used sanitizers with their most common configurations.
    • Constructor Detail

      • Sanitizers

        public Sanitizers()
    • Method Detail

      • pattern

        public static Sanitizer pattern​(String pattern,
                                        String replacement)
                                 throws Exception
        creates and returns a Sanitizer instance that only operates on files that end with a .properties suffix.
        Parameters:
        pattern - WildcardPattern compatible pattern to search for
        replacement - text content to replace matches with
        Returns:
        Sanitizer that only operates on files with names ending with .properties.
        Throws:
        Exception
      • xml

        public static Sanitizer xml​(String xpath)
                             throws Exception
        creates and returns a Sanitizer instance that only operates on files that end with a .xml suffix.
        Parameters:
        xpath - to search for and nullify
        Returns:
        a Sanitizer instance that only operates on files that end with a .xml suffix.
        Throws:
        Exception