public final class URICoder extends Object
unreserved = ALPHA / DIGIT / '-' / '.' / '_' / '˜';
This encoder/decoder should be designed so that URI which contain only unreserved characters are processed faster.
Modifier and Type | Method and Description |
---|---|
static String |
decode(String s)
Decode the string as valid URI fragment.
|
static String |
encode(String s)
Encodes the string as valid URI fragment.
|
static String |
encode(String s,
char c)
Encodes the string as valid URI fragment.
|
static String |
minimalEncode(String s)
Encodes the string as valid URI fragment.
|
public static String encode(String s)
This encoder will encode all but unreserved characters using the escape sequence.
s
- The string to encode.public static String encode(String s, char c)
This encoder will percent-encode all but unreserved characters.
s
- The string to encode.c
- An ASCII character that should not be encoded if found in the string.public static String minimalEncode(String s)
This encoder will percent-encode all but illegal characters.
s
- The string to encode.Copyright © 2016 Allette Systems. All rights reserved.