Class LogUtil
java.lang.Object
org.jpos.util.LogUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternRegex matching XML-reserved characters that force CDATA escaping. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddump(PrintStream p, String indent, String s) Writesstop, wrapping it in<![CDATA[...]]>when the string contains XML-reserved characters.static booleanneedsCDATA(String s) Indicates whetherscontains any XML-reserved characters and therefore needsCDATAescaping when embedded in XML output.
-
Field Details
-
xmlReservedPattern
Regex matching XML-reserved characters that force CDATA escaping.
-
-
Constructor Details
-
LogUtil
public LogUtil()Utility class; instances carry no state.
-
-
Method Details
-
dump
Writesstop, wrapping it in<![CDATA[...]]>when the string contains XML-reserved characters.- Parameters:
p- destination streamindent- prefix used when the value is dumped on a single lines- value to emit
-
needsCDATA
Indicates whetherscontains any XML-reserved characters and therefore needsCDATAescaping when embedded in XML output.- Parameters:
s- value to inspect- Returns:
trueif any of&,<, or>is present
-