public final class UDecoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
ALLOW_ENCODED_SLASH |
Constructor and Description |
---|
UDecoder() |
Modifier and Type | Method and Description |
---|---|
void |
convert(ByteChunk mb,
boolean query)
URLDecode, will modify the source.
|
void |
convert(CharChunk mb,
boolean query)
In-buffer processing - the buffer will be modified
|
void |
convert(MessageBytes mb,
boolean query)
URLDecode, will modify the source
|
java.lang.String |
convert(java.lang.String str,
boolean query) |
static java.lang.String |
URLDecode(byte[] bytes,
java.lang.String enc,
boolean isQuery)
Decode and return the specified URL-encoded byte array.
|
static java.lang.String |
URLDecode(java.lang.String str)
Decode and return the specified URL-encoded String.
|
static java.lang.String |
URLDecode(java.lang.String str,
java.lang.String enc)
Decode and return the specified URL-encoded String.
|
static java.lang.String |
URLDecode(java.lang.String str,
java.lang.String enc,
boolean isQuery)
Decode and return the specified URL-encoded String.
|
public void convert(ByteChunk mb, boolean query) throws java.io.IOException
java.io.IOException
public void convert(CharChunk mb, boolean query) throws java.io.IOException
java.io.IOException
public void convert(MessageBytes mb, boolean query) throws java.io.IOException
java.io.IOException
public final java.lang.String convert(java.lang.String str, boolean query)
public static java.lang.String URLDecode(java.lang.String str)
str
- The url-encoded stringjava.lang.IllegalArgumentException
- if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static java.lang.String URLDecode(java.lang.String str, java.lang.String enc)
str
- The url-encoded stringenc
- The encoding to use; if null, the default encoding is used. If
an unsupported encoding is specified null will be returnedjava.lang.IllegalArgumentException
- if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static java.lang.String URLDecode(java.lang.String str, java.lang.String enc, boolean isQuery)
str
- The url-encoded stringenc
- The encoding to use; if null, the default encoding is used. If
an unsupported encoding is specified null will be returnedisQuery
- Is this a query string being processedjava.lang.IllegalArgumentException
- if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static java.lang.String URLDecode(byte[] bytes, java.lang.String enc, boolean isQuery)
bytes
- The url-encoded byte arrayenc
- The encoding to use; if null, the default encoding is used. If
an unsupported encoding is specified null will be returnedisQuery
- Is this a query string being processedjava.lang.IllegalArgumentException
- if a '%' character is not followed
by a valid 2-digit hexadecimal numberCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.