|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.web.XPHttpUtility
public class XPHttpUtility
Contains static utility methods to encode strings for inclusion in HTML documents or URL strings, or decode such text.
Constructor Summary | |
---|---|
XPHttpUtility()
|
Method Summary | |
---|---|
static java.lang.String |
HtmlDecode(java.lang.String input)
Returns a decoded version of the input string, assuming it was a valid HTML encoding. |
static java.lang.String |
HtmlEncode(java.lang.String input)
Returns an HTML-encoded version of the input string, or empty string if input is null. |
static java.lang.String |
UrlDecode(java.lang.String input,
java.lang.String encoding)
Returns a decoded version of the input string, assuming it was a valid URL encoding. |
static java.lang.String |
UrlEncode(java.lang.String input,
java.lang.String encoding)
Returns a URL-encoded version of the input string, or empty string if input is null. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPHttpUtility()
Method Detail |
---|
public static java.lang.String HtmlEncode(java.lang.String input)
input
- a string of characters to encode for use as HTML text.
public static java.lang.String HtmlDecode(java.lang.String input) throws XPUnsupportedEncodingException
input
- the string to decode
XPNullPointerException
- if input null
XPUnsupportedEncodingException
- if invalid ampersand escape foundpublic static java.lang.String UrlEncode(java.lang.String input, java.lang.String encoding) throws XPUnsupportedEncodingException
input
- a string of characters to encode for use i.encoding
- type of encoding.
XPUnsupportedEncodingException
- if encoding fails.public static java.lang.String UrlDecode(java.lang.String input, java.lang.String encoding) throws XPUnsupportedEncodingException
input
- the string to decodeencoding
- the encoding used to interpret the encoded bytes
XPNullPointerException
- if input null
XPUnsupportedEncodingException
- if invalid ampersand escape found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |