| Modifier and Type | Field and Description |
|---|---|
| private static final char[] | HEXADECIMAL
Hexadecimal digits. |
| private static boolean[] | safe
Whether an ASCII character is URL-safe. |
| private static final String[] | SCHEME_PREFIXES
Valid classpath URL scheme prefixes. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the stringthe str str)Unescape a URL segment, and turn it from UTF-8 bytes into a Java string. |
| public static String | Returns: The encoded path.The path to encode. path)Encode a URL path using percent-encoding. |
| public static String | Returns: the URL stringthe URL path urlPath)Normalize a URL path, so that it can be fed into the URL or URI constructor. |
| private static void | unescapeChars(final String str, final boolean isQuery, final ByteArrayOutputStream buf)
Unescape chars in a URL. |
| HEXADECIMAL | back to summary |
|---|---|
| private static final char[] HEXADECIMAL Hexadecimal digits. | |
| safe | back to summary |
|---|---|
| private static boolean[] safe Whether an ASCII character is URL-safe. | |
| SCHEME_PREFIXES | back to summary |
|---|---|
| private static final String[] SCHEME_PREFIXES Valid classpath URL scheme prefixes. | |
| URLPathEncoder | back to summary |
|---|---|
| private URLPathEncoder() Constructor. | |
| decodePath | back to summary |
|---|---|
| public static String decodePath(final String str) Unescape a URL segment, and turn it from UTF-8 bytes into a Java string. | |
| encodePath | back to summary |
|---|---|
| public static String encodePath(final String path) Encode a URL path using percent-encoding. '/' is not encoded. | |
| normalizeURLPath | back to summary |
|---|---|
| public static String normalizeURLPath(final String urlPath) Normalize a URL path, so that it can be fed into the URL or URI constructor. | |
| unescapeChars | back to summary |
|---|---|
| private static void unescapeChars(final String str, final boolean isQuery, final ByteArrayOutputStream buf) Unescape chars in a URL. URLDecoder.decode is broken: https://bugs.openjdk.java.net/browse/JDK-8179507 | |