Package io.undertow.util
Class URLUtils
- java.lang.Object
-
- io.undertow.util.URLUtils
-
public class URLUtils extends Object
Utilities for dealing with URLs- Author:
- Stuart Douglas
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdecode(String s, String enc, boolean decodeSlash, StringBuilder buffer)Decodes a URL.static StringnormalizeSlashes(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 voidparsePathParms(String string, HttpServerExchange exchange, String charset, boolean doDecode)static voidparseQueryString(String string, HttpServerExchange exchange, String charset, boolean doDecode)
-
-
-
Method Detail
-
parseQueryString
public static void parseQueryString(String string, HttpServerExchange exchange, String charset, boolean doDecode)
-
parsePathParms
public static void parsePathParms(String string, HttpServerExchange exchange, String charset, boolean doDecode)
-
decode
public static String decode(String s, String enc, boolean decodeSlash, StringBuilder buffer)
Decodes a URL. If the decoding fails for any reason then an IllegalArgumentException will be thrown.- Parameters:
s- The string to decodeenc- The encodingdecodeSlash- If slash characters should be decodedbuffer- The string builder to use as a buffer.- Returns:
- The decoded URL
-
-