public final class UEncoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UEncoder.SafeCharsSet |
Constructor and Description |
---|
UEncoder() |
UEncoder(UEncoder.SafeCharsSet safeCharsSet)
Create a UEncoder with an unmodifiable safe character set.
|
Modifier and Type | Method and Description |
---|---|
void |
addSafeCharacter(char c) |
CharChunk |
encodeURL(java.lang.String s,
int start,
int end)
URL Encode string, using a specified encoding.
|
void |
setEncoding(java.lang.String s)
Deprecated.
Unused. Will be removed in Tomcat 8.0.x onwards.
|
protected void |
urlEncode(CharChunk out,
ByteChunk bb) |
public UEncoder()
public UEncoder(UEncoder.SafeCharsSet safeCharsSet)
Calls to addSafeCharacter(char)
on instances created by this constructor will throw an
IllegalStateException
.
safeCharsSet
- safe characters for this encoder@Deprecated public void setEncoding(java.lang.String s)
public void addSafeCharacter(char c)
public CharChunk encodeURL(java.lang.String s, int start, int end) throws java.io.IOException
s
- string to be encodedstart
- the beginning index, inclusiveend
- the ending index, exclusivejava.io.IOException
- If an I/O error occursCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.