Class ResponseUtil


  • public class ResponseUtil
    extends Object
    Response related utility methods

    This class is not intended to be extended or instantiated because it just provides static utility methods not intended to be overwritten.

    Since:
    2.1 (Sling API Bundle 2.1.0)
    • Constructor Detail

      • ResponseUtil

        public ResponseUtil()
    • Method Detail

      • escapeXml

        public static String escapeXml​(String input)
        Escape XML text
        Parameters:
        input - The input text
        Returns:
        The escaped text
      • getXmlEscapingWriter

        @NotNull
        public static @NotNull Writer getXmlEscapingWriter​(@NotNull
                                                           @NotNull Writer target)
        Return a Writer that writes escaped XML text to target
        Parameters:
        target - writer
        Returns:
        Wrapped writer escaping XML