public final class UrlUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getStem(String baseURI)
Return everything in the path up to the last slash in a URI.
|
static Map<String,String> |
parseQueryString(String s)
Create a map from String to String that represents the contents of the query
portion of a URL.
|
static String |
pathDecode(String value)
URL path segments may contain '+' symbols which should not be decoded into ' '
This method replaces '+' with %2B and delegates to URLDecoder
|
static String |
urlDecode(String value) |
static String |
urlDecode(String value,
String enc)
Decodes using URLDecoder - use when queries or form post values are decoded
|
static String |
urlEncode(String value) |
static String |
urlEncode(String value,
String enc) |
public static String urlDecode(String value, String enc)
value
- value to decodeenc
- encodingpublic static String pathDecode(String value)
value
- value to decodepublic static Map<String,String> parseQueryString(String s)
s
- the query part of the URI.Copyright © 2017 JBoss by Red Hat. All rights reserved.