public final class Uris
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.net.URI |
create(java.lang.String s)
Attempts to create a URI instance and will optionally swallow any resulting URISyntaxException depending on
configured
CompatibilityHints. |
static java.lang.String |
decode(java.lang.String s)
Decodes the specified URI string using the UTF-8 charset.
|
static java.lang.String |
encode(java.lang.String s)
Encodes the specified URI string using the UTF-8 charset.
|
public static java.lang.String encode(java.lang.String s)
s - a URI stringpublic static java.lang.String decode(java.lang.String s)
s - a URI stringpublic static java.net.URI create(java.lang.String s)
throws java.net.URISyntaxException
CompatibilityHints. Will also automatically attempt encoding of the string representation for
greater compatibility.s - a string representation of a URI.java.net.URISyntaxException - if a valid URI string is not specified and relaxed parsing is disabled