|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.taglibs.standard.util.EscapeXML
public class EscapeXML
Handles escaping of characters that could be interpreted as XML markup.
The specification for <c:out>
defines the following
character conversions to be applied:
Character | Character Entity Code |
---|---|
< | < |
> | > |
& | & |
' | ' |
" | " |
Constructor Summary | |
---|---|
EscapeXML()
|
Method Summary | |
---|---|
static void |
emit(char[] buffer,
int from,
int count,
javax.servlet.jsp.JspWriter out)
Emit escaped content into the specified JSPWriter. |
static void |
emit(Object src,
boolean escapeXml,
javax.servlet.jsp.JspWriter out)
Emit the supplied object to the specified writer, escaping characters if needed. |
static void |
emit(Reader src,
boolean escapeXml,
javax.servlet.jsp.JspWriter out)
Copy the content of a Reader into the specified JSPWriter escaping characters if needed. |
static void |
emit(String src,
boolean escapeXml,
javax.servlet.jsp.JspWriter out)
Emit the supplied String to the specified writer, escaping characters if needed. |
static void |
emit(String src,
javax.servlet.jsp.JspWriter out)
Emit escaped content into the specified JSPWriter. |
static String |
escape(String src)
Escape a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EscapeXML()
Method Detail |
---|
public static String escape(String src)
src
- the string to escape; must not be null
public static void emit(Object src, boolean escapeXml, javax.servlet.jsp.JspWriter out) throws IOException
src
- the object to writeescapeXml
- if true, escape unsafe characters before writingout
- the JspWriter to emit to
IOException
- if there was a problem emitting the contentpublic static void emit(String src, boolean escapeXml, javax.servlet.jsp.JspWriter out) throws IOException
src
- the String to writeescapeXml
- if true, escape unsafe characters before writingout
- the JspWriter to emit to
IOException
- if there was a problem emitting the contentpublic static void emit(String src, javax.servlet.jsp.JspWriter out) throws IOException
src
- the string to escape; must not be nullout
- the JspWriter to emit to
IOException
- if there was a problem emitting the contentpublic static void emit(Reader src, boolean escapeXml, javax.servlet.jsp.JspWriter out) throws IOException
src
- the Reader to read fromescapeXml
- if true, escape charactersout
- the JspWriter to emit to
IOException
- if there was a problem emitting the contentpublic static void emit(char[] buffer, int from, int count, javax.servlet.jsp.JspWriter out) throws IOException
buffer
- characters to escapefrom
- start position in the buffercount
- number of characters to emitout
- the JspWriter to emit to
IOException
- if there was a problem emitting the content
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |