public class URIref extends Object
| Constructor and Description |
|---|
URIref() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String uri)
Convert a URI, in US-ASCII, with escaped characters taken from UTF-8,
to the corresponding Unicode string.
|
static String |
encode(String unicode)
Convert a Unicode string, first to UTF-8 and then to
an RFC 2396 compliant URI with optional fragment identifier
using %NN escape mechanism as appropriate.
|
public static String encode(String unicode)
unicode - The uri, in characters specified by RFC 2396 + '#'public static String decode(String uri)
uri - The uri, in characters specified by RFC 2396 + '#'.IllegalArgumentException - If a % hex sequence is ill-formed.Licenced under the Apache License, Version 2.0