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

Method Summary
 void encode(char[] chars, CharWriter writer)
           
 void encode(char[] chars, int off, int len, CharWriter writer)
           
 void encode(char c, CharWriter writer)
           
 void encode(java.lang.CharSequence s, CharWriter writer)
           
 java.lang.String encode(java.lang.String string)
           
 

Method Detail

encode

void encode(char c,
            CharWriter writer)
            throws java.lang.IllegalArgumentException,
                   EncodingException
Parameters:
c - the char to encode
writer - 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 encode
off - the offset in the char array
len - the lenght of chars to encode
writer - 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 encode
writer - 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 encode
writer - 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