Class ResponseUtil


  • public class ResponseUtil
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      ResponseUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeXml​(java.lang.String input)
      Escape XML text
      static @NotNull java.io.Writer getXmlEscapingWriter​(@NotNull java.io.Writer target)
      Return a Writer that writes escaped XML text to target
      • Methods inherited from class java.lang.Object

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

      • ResponseUtil

        public ResponseUtil()
    • Method Detail

      • escapeXml

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

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