org.jboss.portal.common.text
Interface CharEncoder
- All Known Implementing Classes:
- AbstractCharEncoder, EntityEncoder, FastURLDecoder, FastURLEncoder
public interface CharEncoder
Defines an interface for encoding chars.
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
encode
void encode(char c,
CharWriter writer)
throws java.lang.IllegalArgumentException,
EncodingException
- Parameters:
c - the char to encodewriter - the writer to use
- Throws:
java.lang.IllegalArgumentException - if any argument is null
EncodingException - an encoding exception
encode
void encode(char[] chars,
int off,
int len,
CharWriter writer)
throws java.lang.IllegalArgumentException,
EncodingException
- Parameters:
chars - the chars to encodeoff - the offset in the char arraylen - the lenght of chars to encodewriter - the writer to use
- Throws:
java.lang.IllegalArgumentException - if any argument is null or if the bounds not valid in the provided array
EncodingException - an encoding exception
encode
void encode(char[] chars,
CharWriter writer)
throws java.lang.IllegalArgumentException,
EncodingException
- Parameters:
chars - the chars to encodewriter - the writer to use
- Throws:
java.lang.IllegalArgumentException - if any argument is null
EncodingException - an encoding exception
encode
void encode(java.lang.CharSequence s,
CharWriter writer)
throws java.lang.IllegalArgumentException,
EncodingException
- Parameters:
s - the sequence to encodewriter - the writer to use
- Throws:
java.lang.IllegalArgumentException - if any argument is null
EncodingException - an encoding exception
encode
java.lang.String encode(java.lang.String string)
throws java.lang.IllegalArgumentException
- Parameters:
string - the String to encode
- Returns:
- the encoded String
- Throws:
java.lang.IllegalArgumentException - if the specified String is null