public class Urls
extends java.lang.Object
Constructor and Description |
---|
Urls() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
toProtocolHostAndPort(java.lang.String url)
Strips the specified URL so it only includes a protocal, hostname and port
|
static java.lang.String |
urlEncode(java.lang.String value)
Encodes the text as an URL using UTF-8.
|
public static java.lang.String toProtocolHostAndPort(java.lang.String url)
java.net.MalformedURLException
public static java.lang.String urlEncode(java.lang.String value)
value
- the text too encodeURLEncoder.encode(java.lang.String, java.lang.String)