|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.peaseplate.internal.util.EncodeUtils
public class EncodeUtils
| Constructor Summary | |
|---|---|
EncodeUtils()
|
|
| Method Summary | |
|---|---|
protected static java.lang.String |
encode(org.peaseplate.internal.util.EncodeUtils.EscapeSequenceProducer producer,
java.lang.Object value)
Encodes the value by using the specified escape sequences. |
protected static java.lang.String |
get4DigitHexValue(char value)
Returns the 4-digit hex value of the character. |
static java.lang.String |
toHTML(java.lang.Object value)
Encodes the value using HTML entities. |
static java.lang.String |
toHTML(java.lang.Object value,
boolean encodeCRLF)
Encodes the value using HTML entities. |
static java.lang.String |
toHTML(java.lang.Object value,
boolean encodeCRLF,
boolean encodeSpace,
int encodeTabBy)
Encodes the value using HTML entities |
static java.lang.String |
toJavaScript(java.lang.Object value)
Encodes the value to be used in Javascript strings. |
static java.lang.String |
toJSON(java.lang.Object value)
Encodes the value to be used in JSON strings. |
static java.lang.String |
toXML(java.lang.Object value)
Encodes the value using XML entities |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncodeUtils()
| Method Detail |
|---|
public static java.lang.String toJavaScript(java.lang.Object value)
context - the contextvalue - the value, may be null
public static java.lang.String toJSON(java.lang.Object value)
value - the value, may be null
public static java.lang.String toXML(java.lang.Object value)
value - the value, may be null
public static java.lang.String toHTML(java.lang.Object value)
value - the value, may be null
public static java.lang.String toHTML(java.lang.Object value,
boolean encodeCRLF)
value - the value, may be nullencodeCRLF - if set to true, this method encodes CR or LF or CRLF to <br />
public static java.lang.String toHTML(java.lang.Object value,
boolean encodeCRLF,
boolean encodeSpace,
int encodeTabBy)
value - the value, may be nullencodeCRLF - if set to true, this method encodes \r or \n or \r\n to <br />encodeSpace - if set to true, this method encodes spaces (0x20) to encodeTabBy - if set to >= 0, this method encodes tabs to the specified amount of
protected static java.lang.String encode(org.peaseplate.internal.util.EncodeUtils.EscapeSequenceProducer producer,
java.lang.Object value)
producer - the producer for the escape sequencedvalue - the value, may be null
protected static java.lang.String get4DigitHexValue(char value)
value - the value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||