|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.hpl.jena.util.URIref
public class URIref
This class provides methods to encode and decode URI References in accordance with http://www.w3.org/TR/charmod/#sec-URIs . The details of how the algorithms handle '%' are captured in http://lists.w3.org/Archives/Public/uri/2001Sep/0009.html
Constructor Summary | |
---|---|
URIref()
|
Method Summary | |
---|---|
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. |
static void |
main(String[] args)
For simple testing ... |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URIref()
Method Detail |
---|
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.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |