org.apache.cocoon.components.serializers.encoding
Class XMLEncoder
java.lang.Object
org.apache.cocoon.components.serializers.encoding.AbstractCharset
org.apache.cocoon.components.serializers.encoding.CompiledCharset
org.apache.cocoon.components.serializers.encoding.CompiledEncoder
org.apache.cocoon.components.serializers.encoding.XMLEncoder
- All Implemented Interfaces:
- Charset, Encoder, Verifier
- Direct Known Subclasses:
- XHTMLEncoder
public class XMLEncoder
- extends CompiledEncoder
- Version:
- CVS $Id: XMLEncoder.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Pier Fumagalli, February 2003
Constructor Summary |
|
XMLEncoder()
Create a new instance of this XMLEncoder . |
protected |
XMLEncoder(String name)
Create a new instance of this XMLEncoder . |
Method Summary |
protected boolean |
compile(char c)
Return true or false wether this encoding 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 interface org.apache.cocoon.components.serializers.encoding.Verifier |
allows |
XMLEncoder
public XMLEncoder()
- Create a new instance of this
XMLEncoder
.
XMLEncoder
protected XMLEncoder(String name)
- Create a new instance of this
XMLEncoder
.
- Parameters:
name
- A name for this Encoding
.
- Throws:
NullPointerException
- If one of the arguments is null.
compile
protected boolean compile(char c)
- Return true or false wether this encoding can encode the specified
character or not.
This method will return true for the following character range:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
- Specified by:
compile
in class CompiledCharset
- See Also:
- W3C XML 1.0
encode
public char[] encode(char c)
- Return an array of characters representing the encoding for the
specified character.
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.