Top Description Fields Constructors Methods
ch.qos.logback.core.helpers

public Class Transform

extends Object
Class Inheritance
Imports
java.util.regex.Pattern

Utility class for transforming strings.
Authors
Ceki Gülcü, Michael A. McAngus

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final int
private static final String
private static final String
private static final Pattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
appendEscapingCDATA(StringBuilder
Writer. The initial CDStart (<![CDATA[) and final CDEnd (]]>) of the CDATA section are the responsibility of the calling method.
output
,
String
The String that is inserted into an existing CDATA Section.
str
)

Ensures that embedded CDEnd strings (]]>) are handled properly within message, NDC and throwable tag text.

public static String
escapeTags(final String
The text to be converted.
input
)

This method takes a string which may contain HTML tags (ie, <b>, <table>, etc) and replaces any '<','>' ...

public static String
escapeTags(final StringBuffer
StringBuffer to transform
buf
)

This method takes a StringBuilder which may contain HTML tags (ie, <b>, <table>, etc) and replaces any '<' and '>' characters with respective predefined entity references.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CDATA_EMBEDED_ENDback to summary
private static final String CDATA_EMBEDED_END
CDATA_ENDback to summary
private static final String CDATA_END
CDATA_END_LENback to summary
private static final int CDATA_END_LEN
CDATA_PSEUDO_ENDback to summary
private static final String CDATA_PSEUDO_END
CDATA_STARTback to summary
private static final String CDATA_START
UNSAFE_XML_CHARSback to summary
private static final Pattern UNSAFE_XML_CHARS

Constructor Detail

Transformback to summary
public Transform()

Method Detail

appendEscapingCDATAback to summary
public static void appendEscapingCDATA(StringBuilder output, String str)

Ensures that embedded CDEnd strings (]]>) are handled properly within message, NDC and throwable tag text.

Parameters
output:StringBuilder

Writer. The initial CDStart (<![CDATA[) and final CDEnd (]]>) of the CDATA section are the responsibility of the calling method.

str:String

The String that is inserted into an existing CDATA Section.

escapeTagsback to summary
public static String escapeTags(final String input)

This method takes a string which may contain HTML tags (ie, <b>, <table>, etc) and replaces any '<','>' ... characters with respective predefined entity references.

Parameters
input:String

The text to be converted.

escapeTagsback to summary
public static String escapeTags(final StringBuffer buf)

This method takes a StringBuilder which may contain HTML tags (ie, <b>, <table>, etc) and replaces any '<' and '>' characters with respective predefined entity references.

Parameters
buf:StringBuffer

StringBuffer to transform