Class ResponseUtil

java.lang.Object
org.apache.sling.api.request.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 Details

    • ResponseUtil

      public ResponseUtil()
  • Method Details

    • 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