org.jboss.portal.common.text
Class FastURLEncoder
java.lang.Object
org.jboss.portal.common.text.AbstractCharEncoder
org.jboss.portal.common.text.FastURLEncoder
- All Implemented Interfaces:
- CharEncoder
public class FastURLEncoder
- extends AbstractCharEncoder
An implementation based on a table for lookups.
- Version:
- $Revision: 7228 $
- Author:
- Julien Viet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FastURLEncoder
public FastURLEncoder(CharToByteEncoder encoder)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getUTF8Instance
public static FastURLEncoder getUTF8Instance()
encode
public void encode(char c,
CharWriter writer)
throws java.lang.IllegalArgumentException
- Specified by:
encode
in interface CharEncoder
- Overrides:
encode
in class AbstractCharEncoder
- Parameters:
c
- the char to encodewriter
- the writer to use
- Throws:
java.lang.IllegalArgumentException
- if any argument is null
safeEncode
protected void safeEncode(char[] chars,
int off,
int len,
CharWriter writer)
- Specified by:
safeEncode
in class AbstractCharEncoder
encode
public void encode(java.lang.String s,
java.io.Writer out)
throws java.lang.IllegalArgumentException,
UndeclaredIOException
- Throws:
java.lang.IllegalArgumentException
UndeclaredIOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object