|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openxri.IRIUtils
public class IRIUtils
Utility class that provides XRI-IRI-URI transformations
Constructor Summary | |
---|---|
IRIUtils()
|
Method Summary | |
---|---|
static int |
decodeHex(java.lang.String s,
int index)
Attempts to decode a 3-character percent-encoded sequence to the numeric value. |
static java.lang.String |
IRItoURI(java.lang.String iri)
Transforms the given IRI to URI. |
static java.lang.String |
IRItoXRI(java.lang.String iri)
|
protected static boolean |
isIPrivate(int cp)
|
protected static boolean |
isUCSChar(int cp)
|
protected static boolean |
isUCSCharOrIPrivate(int cp)
|
protected static java.lang.String |
toUTF8PercentEncoded(int cp)
|
static java.lang.String |
URItoIRI(java.lang.String uri)
Transform the given URI to IRI according to the rules in RFC3987 section 3.2 |
static java.lang.String |
XRItoIRI(java.lang.String s,
boolean inXref)
Transforms the given XRI part to IRI-normal form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IRIUtils()
Method Detail |
---|
public static java.lang.String IRItoXRI(java.lang.String iri)
public static java.lang.String URItoIRI(java.lang.String uri) throws java.io.UnsupportedEncodingException
uri
- - this MUST be a valid URI string. Use the java.net.URI
class
to check before using this method.
java.io.UnsupportedEncodingException
public static java.lang.String IRItoURI(java.lang.String iri)
iri
-
protected static java.lang.String toUTF8PercentEncoded(int cp)
protected static boolean isUCSCharOrIPrivate(int cp)
protected static boolean isUCSChar(int cp)
protected static boolean isIPrivate(int cp)
public static java.lang.String XRItoIRI(java.lang.String s, boolean inXref)
inXref
is true, also percent encodes
'#', '?' and '/'.
s
- inXref
-
public static int decodeHex(java.lang.String s, int index)
s
- index
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |