public class URLUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
decode(String s,
Charset enc,
boolean decodeSlash,
boolean formEncoding,
StringBuilder buffer)
Decodes a URL.
|
static String |
decode(String s,
Charset 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 void |
parsePathParameters(String path,
Set<String> pathParameters)
Extract path param names out of a JAX-RS path.
|
static int |
parsePathParams(String string,
javax.ws.rs.core.MultivaluedMap<String,String> exchange,
Charset charset,
boolean doDecode,
int maxParameters) |
static void |
parsePathParms(String string,
javax.ws.rs.core.MultivaluedMap<String,String> exchange,
Charset charset,
boolean doDecode,
int maxParameters)
Deprecated.
|
static void |
parseQueryString(String string,
javax.ws.rs.core.MultivaluedMap<String,String> exchange,
Charset charset,
boolean doDecode,
int maxParameters) |
public static void parseQueryString(String string, javax.ws.rs.core.MultivaluedMap<String,String> exchange, Charset charset, boolean doDecode, int maxParameters)
@Deprecated public static void parsePathParms(String string, javax.ws.rs.core.MultivaluedMap<String,String> exchange, Charset charset, boolean doDecode, int maxParameters)
public static int parsePathParams(String string, javax.ws.rs.core.MultivaluedMap<String,String> exchange, Charset charset, boolean doDecode, int maxParameters)
public static String decode(String s, Charset 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, Charset 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 void parsePathParameters(String path, Set<String> pathParameters)
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 © 2021 JBoss by Red Hat. All rights reserved.