| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | percentMatcher
Match %-encoded characters in URLs. |
| private static final Pattern | schemeOneOrTwoSlashMatcher
Match custom URLs that are followed by one or two slashes. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| public static String | Returns: The normalized path.The path to normalize. path, final boolean True if this is a "file:" or "jar:" URL. isFileOrJarURL)Parse percent encoding, e.g. "%20" -> " "; convert '/' or '\\' to SEP; remove trailing separator char if present. |
| public static String | Returns: The resolved path.The base path. resolveBasePath, final String The path to resolve relative to the base path. relativePath)Strip away any "jar:" prefix from a filename URI, and convert it to a file path, handling possibly-broken mixes of filesystem and URI conventions; resolve relative paths relative to resolveBasePath. |
| public static String | |
| private static void | translateSeparator(final String
the path path, final int the start index startIdx, final int the end index endIdx, final boolean if true, strip the final separator stripFinalSeparator, final StringBuilder the buf buf)Translate backslashes to forward slashes, optionally removing trailing separator. |
| private static void | unescapePercentEncoding(final String
the path path, final int the start index startIdx, final int the end index endIdx, final StringBuilder the buf buf)Unescape runs of percent encoding, e.g. "%20%43%20" -> " + " |
| percentMatcher | back to summary |
|---|---|
| private static final Pattern percentMatcher Match %-encoded characters in URLs. | |
| schemeOneOrTwoSlashMatcher | back to summary |
|---|---|
| private static final Pattern schemeOneOrTwoSlashMatcher Match custom URLs that are followed by one or two slashes. | |
| FastPathResolver | back to summary |
|---|---|
| private FastPathResolver() Constructor. | |
| hexCharToInt | back to summary |
|---|---|
| private static int hexCharToInt(final char c) Hex char to int.
| |
| normalizePath | back to summary |
|---|---|
| public static String normalizePath(final String path, final boolean isFileOrJarURL) Parse percent encoding, e.g. "%20" -> " "; convert '/' or '\\' to SEP; remove trailing separator char if present. | |
| resolve | back to summary |
|---|---|
| public static String resolve(final String resolveBasePath, final String relativePath) Strip away any "jar:" prefix from a filename URI, and convert it to a file path, handling possibly-broken mixes of filesystem and URI conventions; resolve relative paths relative to resolveBasePath. | |
| resolve | back to summary |
|---|---|
| public static String resolve(final String pathStr) Strip away any "jar:" prefix from a filename URI, and convert it to a file path, handling possibly-broken mixes of filesystem and URI conventions. Returns null if relativePathStr is an "http(s):" path. | |
| translateSeparator | back to summary |
|---|---|
| private static void translateSeparator(final String path, final int startIdx, final int endIdx, final boolean stripFinalSeparator, final StringBuilder buf) Translate backslashes to forward slashes, optionally removing trailing separator.
| |
| unescapePercentEncoding | back to summary |
|---|---|
| private static void unescapePercentEncoding(final String path, final int startIdx, final int endIdx, final StringBuilder buf) Unescape runs of percent encoding, e.g. "%20%43%20" -> " + "
| |