Package org.apache.sling.api.request

# 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 Summary

Constructors
Constructor
Description
`ResponseUtil()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`escapeXml(String input)`
Escape XML text
`static @NotNull Writer`
`getXmlEscapingWriter(@NotNull Writer target)`
Return a Writer that writes escaped XML text to target

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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