Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » buf » [javadoc | source]
public final class: UEncoder [javadoc | source]
Efficient implementation for encoders. This class is not thread safe - you need one encoder per thread. The encoder will save and recycle the internal objects, avoiding garbage. You can add extra characters that you want preserved, for example while encoding a URL you can add "/".
 public UEncoder() 
Method from org.apache.tomcat.util.buf.UEncoder Summary:
addSafeCharacter,   encodeURL,   setEncoding,   urlEncode,   urlEncode
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.buf.UEncoder Detail:
 public  void addSafeCharacter(char c) 
 public String encodeURL(String uri) 
    Utility funtion to re-encode the URL. Still has problems with charset, since UEncoder mostly ignores it.
 public  void setEncoding(String s) 
 public  void urlEncode(Writer buf,
    String s) throws IOException 
    URL Encode string, using a specified encoding.
 public  void urlEncode(Writer buf,
    byte[] bytes,
    int off,
    int len) throws IOException