public final class UDecoder extends Object
| Constructor and Description |
|---|
UDecoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
convert(ByteChunk mb,
boolean query)
URLDecode, will modify the source.
|
void |
convert(ByteChunk mb,
EncodedSolidusHandling encodedSolidusHandling)
URLDecode, will modify the source.
|
static String |
URLDecode(String str,
Charset charset)
Decode and return the specified URL-encoded String.
|
public void convert(ByteChunk mb, boolean query) throws IOException
mb - The URL encoded bytesquery - true if this is a query string. For a query string
'+' will be decoded to ' 'IOException - Invalid %xx URL encodingpublic void convert(ByteChunk mb, EncodedSolidusHandling encodedSolidusHandling) throws IOException
mb - The URL encoded bytesencodedSolidusHandling - How should the %2f sequence handled by
the decoder? For query strings this
parameter will be ignored and the
%2f sequence will be decodedIOException - Invalid %xx URL encodingpublic static String URLDecode(String str, Charset charset)
str - The url-encoded stringcharset - The character encoding to use; if null, UTF-8 is used.IllegalArgumentException - if a '%' character is not followed
by a valid 2-digit hexadecimal numberCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.