public class Urls
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
log |
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 protocol, 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)
url
- URLpublic static java.lang.String urlEncode(java.lang.String value)
value
- the text too encodeURLEncoder.encode(java.lang.String, java.lang.String)