org.ajax4jsf.javascript
Class JSEncoder
java.lang.Object
org.ajax4jsf.javascript.JSEncoder
public class JSEncoder
- extends Object
- Author:
- shura Encode chars as JavaScript sequences
Constructor Summary |
JSEncoder()
Create a new instance of this XMLEncoder . |
Method Summary |
boolean |
compile(char c)
Return true or false whether this encoding/format can encode the specified character or not. |
char[] |
encode(char c)
Return an array of characters representing the encoding for the specified character. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSEncoder
public JSEncoder()
- Create a new instance of this
XMLEncoder
.
compile
public boolean compile(char c)
- Return true or false whether this encoding/format can encode the specified character or not.
This method will return true for the following character range:
\b | \f | \t | \r | \n | " | \ | / | [#x20-#xD7FF] | [#xE000-#xFFFD]
- See Also:
- W3C XML 1.0 ,
JSON.org
encode
public char[] encode(char c)
- Return an array of characters representing the encoding for the specified character.
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.