public class URLUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String | decode(String s, String enc, boolean decodeSlash, boolean formEncoding, StringBuilder buffer) Decodes a URL. |
static String | decode(String s, String enc, boolean decodeSlash, StringBuilder buffer) Decodes a URL. |
static boolean | isAbsoluteUrl(String location) Test if provided location is an absolute URI or not. |
static String | normalizeSlashes(String path) Adds a '/' prefix to the beginning of a path if one isn't present and removes trailing slashes if any are present. |
static int | parsePathParams(String string, HttpServerExchange exchange, String charset, boolean doDecode, int maxParameters) |
static void | parsePathParms(String string, HttpServerExchange exchange, String charset, boolean doDecode, int maxParameters) Deprecated. |
static void | parseQueryString(String string, HttpServerExchange exchange, String charset, boolean doDecode, int maxParameters) |
public static void parseQueryString(String string, HttpServerExchange exchange, String charset, boolean doDecode, int maxParameters) throws ParameterLimitException
ParameterLimitException
@Deprecated public static void parsePathParms(String string, HttpServerExchange exchange, String charset, boolean doDecode, int maxParameters) throws ParameterLimitException
ParameterLimitException
public static int parsePathParams(String string, HttpServerExchange exchange, String charset, boolean doDecode, int maxParameters) throws ParameterLimitException
ParameterLimitException
public static String decode(String s, String enc, boolean decodeSlash, StringBuilder buffer)
s
- The string to decodeenc
- The encodingdecodeSlash
- If slash characters should be decodedbuffer
- The string builder to use as a buffer.public static String decode(String s, String enc, boolean decodeSlash, boolean formEncoding, StringBuilder buffer)
s
- The string to decodeenc
- The encodingdecodeSlash
- If slash characters should be decodedbuffer
- The string builder to use as a buffer.public static String normalizeSlashes(String path)
path
- the path to normalizepublic static boolean isAbsoluteUrl(String location)
location
- location to check, null = relative, having scheme = absoluteCopyright © 2020 JBoss by Red Hat. All rights reserved.