GeoPubby
Version 0.1.0.0
|
Implements the IRI-to-URI and URI-to-IRI conversions defined in RFC 3987. More...
Static Public Member Functions | |
static String | toIRI (String uri) |
Converts a URI to an IRI by removing unnecessary percent-encoding of UTF-8 sequences. More... | |
static String | toURI (String iri) |
Converts an IRI to a URI by percent-encoding characters outside of the US-ASCII range. More... | |
Static Private Member Functions | |
static String | decode (String percentEncoded) |
static boolean | isContinuationOctet (int octet) |
static void | appendOctet (StringBuffer sb, byte octet) |
static int | getBytesInSequence (int octet) |
static char | toCharacter (int[] octets, int offset, int length) |
static boolean | isUnreservedASCII (char c) |
static int[] | toBytes (String percentEncoded) |
static int | toByte (char hex1, char hex2) |
static int | toByte (char hex) |
Static Private Attributes | |
static final Pattern | percentEncoding = Pattern.compile("(%[0-9a-fA-F][0-9a-fA-F])+") |
static char[] | hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'} |
Implements the IRI-to-URI and URI-to-IRI conversions defined in RFC 3987.
TODO: This really needs some unit tests TODO: Make this an IRIRewriter?
|
staticprivate |
|
staticprivate |
References IRIEncoder.appendOctet(), IRIEncoder.getBytesInSequence(), IRIEncoder.isContinuationOctet(), IRIEncoder.isUnreservedASCII(), IRIEncoder.toBytes(), and IRIEncoder.toCharacter().
Referenced by IRIEncoder.toIRI().
|
staticprivate |
Referenced by IRIEncoder.decode().
|
staticprivate |
Referenced by IRIEncoder.decode().
|
staticprivate |
Referenced by IRIEncoder.decode().
|
staticprivate |
|
staticprivate |
Referenced by IRIEncoder.toBytes().
|
staticprivate |
|
staticprivate |
Referenced by IRIEncoder.decode().
|
static |
Converts a URI to an IRI by removing unnecessary percent-encoding of UTF-8 sequences.
References IRIEncoder.decode(), and IRIEncoder.percentEncoding.
Referenced by ValuesBaseServlet.doGet(), Configuration.getControls(), and PubbyIRIEscaper.rewrite().
|
static |
Converts an IRI to a URI by percent-encoding characters outside of the US-ASCII range.
References IRIEncoder.appendOctet().
Referenced by RootServlet.doGet(), WebURIServlet.doGet(), and PubbyIRIEscaper.unrewrite().
|
staticprivate |
Referenced by IRIEncoder.appendOctet().
|
staticprivate |
Referenced by IRIEncoder.toIRI().