TODO: These methods are for highest performance and are consistent with the JavaScript methods. They are not meant for general purpose URL manipulation, and are not trying to replace any full-featured URI tools.
Consider the following if needing more than what this provides (in no particular order):
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Encodes a URI to RFC 3986 ASCII format in the default encoding
.IRI.ENCODING
static void
encodeURI
(String uri, Encoder encoder, Appendable out) Encodes a URI to RFC 3986 ASCII format in the default encoding
.IRI.ENCODING
static void
encodeURI
(String uri, Appendable out) Encodes a URI to RFC 3986 ASCII format in the default encoding
.IRI.ENCODING
static void
encodeURI
(String uri, StringBuffer sb) Encodes a URI to RFC 3986 ASCII format in the default encoding
.IRI.ENCODING
static void
encodeURI
(String uri, StringBuilder sb) Encodes a URI to RFC 3986 ASCII format in the default encoding
.IRI.ENCODING
static String
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
static void
encodeURIComponent
(String s, Encoder encoder, Appendable out) Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
static void
encodeURIComponent
(String s, Appendable out) Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
static void
encodeURIComponent
(String s, StringBuffer sb) Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
static void
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
-
Method Details
-
encodeURIComponent
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
This uses
URLEncoder.encode(java.lang.String)
then replaces '+' with "%20".- See Also:
-
encodeURIComponent
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
This uses
URLEncoder.encode(java.lang.String, java.lang.String)
then replaces '+' with "%20".- Throws:
IOException
- See Also:
-
encodeURIComponent
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
This uses
URLEncoder.encode(java.lang.String, java.lang.String)
then replaces '+' with "%20".- Parameters:
encoder
- An optional encoder the output is applied through- Throws:
IOException
- See Also:
-
encodeURIComponent
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
This uses
URLEncoder.encode(java.lang.String, java.lang.String)
then replaces '+' with "%20".- See Also:
-
encodeURIComponent
Encodes a value for use in a path component or fragment in the default encoding
.IRI.ENCODING
This uses
URLEncoder.encode(java.lang.String, java.lang.String)
then replaces '+' with "%20".- See Also:
-
encodeURI
Encodes a URI to RFC 3986 ASCII format in the default encoding
. Encodes the characters in the URI, not including any characters defined in RFC 3986: Reserved Characters, '%' (for already percent-encoded), and unprintable invalid.IRI.ENCODING
Any existing lower-case percent-encoded values are normalized to upper-case.
- Returns:
- The encoded URI or
url
when not modified - See Also:
-
encodeURI
Encodes a URI to RFC 3986 ASCII format in the default encoding
. Encodes the characters in the URI, not including any characters defined in RFC 3986: Reserved Characters, '%' (for already percent-encoded), and unprintable invalid.IRI.ENCODING
Any existing lower-case percent-encoded values are normalized to upper-case.
- Throws:
IOException
- See Also:
-
encodeURI
Encodes a URI to RFC 3986 ASCII format in the default encoding
. Encodes the characters in the URI, not including any characters defined in RFC 3986: Reserved Characters, '%' (for already percent-encoded), and unprintable invalid.IRI.ENCODING
Any existing lower-case percent-encoded values are normalized to upper-case.
- Parameters:
encoder
- An optional encoder the output is applied through- Throws:
IOException
- See Also:
-
encodeURI
Encodes a URI to RFC 3986 ASCII format in the default encoding
. Encodes the characters in the URI, not including any characters defined in RFC 3986: Reserved Characters, '%' (for already percent-encoded), and unprintable invalid.IRI.ENCODING
Any existing lower-case percent-encoded values are normalized to upper-case.
- See Also:
-
encodeURI
Encodes a URI to RFC 3986 ASCII format in the default encoding
. Encodes the characters in the URI, not including any characters defined in RFC 3986: Reserved Characters, '%' (for already percent-encoded), and unprintable invalid.IRI.ENCODING
Any existing lower-case percent-encoded values are normalized to upper-case.
- See Also:
-