public abstract class UriEncoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.BitSet |
allowedCharacters |
private static java.nio.charset.CharsetDecoder |
UTF8Decoder |
Constructor and Description |
---|
UriEncoder() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decode(java.nio.ByteBuffer buff)
Decode '%'-escaped characters.
|
static java.lang.String |
decode(java.lang.String buff) |
static java.lang.String |
encode(java.lang.String uri)
Escape special characters with '%'
|
private static final java.util.BitSet allowedCharacters
private static final java.nio.charset.CharsetDecoder UTF8Decoder
public static java.lang.String encode(java.lang.String uri)
uri
- URI to be escapedpublic static java.lang.String decode(java.nio.ByteBuffer buff) throws java.nio.charset.CharacterCodingException
buff
- data to decodejava.nio.charset.CharacterCodingException
- if cannot be decodedpublic static java.lang.String decode(java.lang.String buff)