org.jboss.portal.common.text
Class AbstractCharEncoder
java.lang.Object
org.jboss.portal.common.text.AbstractCharEncoder
- All Implemented Interfaces:
- CharEncoder
- Direct Known Subclasses:
- EntityEncoder, FastURLDecoder, FastURLEncoder
public abstract class AbstractCharEncoder
- extends java.lang.Object
- implements CharEncoder
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCharEncoder
public AbstractCharEncoder()
encode
public void encode(char[] chars,
int off,
int len,
CharWriter writer)
throws EncodingException
- Specified by:
encode
in interface CharEncoder
- Parameters:
chars
- the chars to encodeoff
- the offset in the char arraylen
- the lenght of chars to encodewriter
- the writer to use
- Throws:
EncodingException
- an encoding exception
encode
public void encode(char[] chars,
CharWriter writer)
throws EncodingException
- Specified by:
encode
in interface CharEncoder
- Parameters:
chars
- the chars to encodewriter
- the writer to use
- Throws:
EncodingException
- an encoding exception
encode
public void encode(java.lang.CharSequence s,
CharWriter writer)
throws EncodingException
- Specified by:
encode
in interface CharEncoder
- Parameters:
s
- the sequence to encodewriter
- the writer to use
- Throws:
EncodingException
- an encoding exception
encode
public void encode(char c,
CharWriter writer)
throws EncodingException
- Specified by:
encode
in interface CharEncoder
- Parameters:
c
- the char to encodewriter
- the writer to use
- Throws:
EncodingException
- an encoding exception
encode
public java.lang.String encode(java.lang.String string)
throws EncodingException
- Specified by:
encode
in interface CharEncoder
- Parameters:
string
- the String to encode
- Returns:
- the encoded String
- Throws:
EncodingException
safeEncode
protected abstract void safeEncode(char[] chars,
int off,
int len,
CharWriter writer)
throws EncodingException
- Throws:
EncodingException