public final class UriEscape
extends Object
Utility class for performing URI escape/unescape operations.
FeaturesSpecific features of the URI escape/unescape operations performed by means of this class:
There are four different input/output modes that can be used in escape/unescape operations:
The following references apply:
Modifier and Type | Field | Description |
---|---|---|
static String |
DEFAULT_ENCODING |
The default encoding for URI escaping/unescaping: UTF-8.
|
Modifier and Type | Method | Description |
---|---|---|
static void |
escapeUriFragmentId(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI fragment identifier escape operation
on a char[] input using UTF-8 as encoding.
|
static void |
escapeUriFragmentId(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI fragment identifier escape operation
on a char[] input.
|
static void |
escapeUriFragmentId(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI fragment identifier escape operation
on a Reader input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriFragmentId(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI fragment identifier escape operation
on a Reader input, writing results to a Writer.
|
static String |
escapeUriFragmentId(String text) |
Perform am URI fragment identifier escape operation
on a String input using UTF-8 as encoding.
|
static void |
escapeUriFragmentId(String text,
java.io.Writer writer) |
Perform am URI fragment identifier escape operation
on a String input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriFragmentId(String text,
java.io.Writer writer,
String encoding) |
Perform am URI fragment identifier escape operation
on a String input, writing results to a Writer.
|
static String |
escapeUriFragmentId(String text,
String encoding) |
Perform am URI fragment identifier escape operation
on a String input.
|
static void |
escapeUriPath(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI path escape operation
on a char[] input using UTF-8 as encoding.
|
static void |
escapeUriPath(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI path escape operation
on a char[] input.
|
static void |
escapeUriPath(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI path escape operation
on a Reader input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriPath(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI path escape operation
on a Reader input, writing results to a Writer.
|
static String |
escapeUriPath(String text) |
Perform am URI path escape operation
on a String input using UTF-8 as encoding.
|
static void |
escapeUriPath(String text,
java.io.Writer writer) |
Perform am URI path escape operation
on a String input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriPath(String text,
java.io.Writer writer,
String encoding) |
Perform am URI path escape operation
on a String input, writing results to a Writer.
|
static String |
escapeUriPath(String text,
String encoding) |
Perform am URI path escape operation
on a String input.
|
static void |
escapeUriPathSegment(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI path segment escape operation
on a char[] input using UTF-8 as encoding.
|
static void |
escapeUriPathSegment(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI path segment escape operation
on a char[] input.
|
static void |
escapeUriPathSegment(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI path segment escape operation
on a Reader input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriPathSegment(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI path segment escape operation
on a Reader input, writing results to a Writer.
|
static String |
escapeUriPathSegment(String text) |
Perform am URI path segment escape operation
on a String input using UTF-8 as encoding.
|
static void |
escapeUriPathSegment(String text,
java.io.Writer writer) |
Perform am URI path segment escape operation
on a String input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriPathSegment(String text,
java.io.Writer writer,
String encoding) |
Perform am URI path segment escape operation
on a String input, writing results to a Writer.
|
static String |
escapeUriPathSegment(String text,
String encoding) |
Perform am URI path segment escape operation
on a String input.
|
static void |
escapeUriQueryParam(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI query parameter (name or value) escape operation
on a char[] input using UTF-8 as encoding.
|
static void |
escapeUriQueryParam(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI query parameter (name or value) escape operation
on a char[] input.
|
static void |
escapeUriQueryParam(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI query parameter (name or value) escape operation
on a Reader input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriQueryParam(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI query parameter (name or value) escape operation
on a Reader input, writing results to a Writer.
|
static String |
escapeUriQueryParam(String text) |
Perform am URI query parameter (name or value) escape operation
on a String input using UTF-8 as encoding.
|
static void |
escapeUriQueryParam(String text,
java.io.Writer writer) |
Perform am URI query parameter (name or value) escape operation
on a String input using UTF-8 as encoding,
writing results to a Writer.
|
static void |
escapeUriQueryParam(String text,
java.io.Writer writer,
String encoding) |
Perform am URI query parameter (name or value) escape operation
on a String input, writing results to a Writer.
|
static String |
escapeUriQueryParam(String text,
String encoding) |
Perform am URI query parameter (name or value) escape operation
on a String input.
|
static void |
unescapeUriFragmentId(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI fragment identifier unescape operation
on a char[] input using UTF-8 as encoding.
|
static void |
unescapeUriFragmentId(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI fragment identifier unescape operation
on a char[] input.
|
static void |
unescapeUriFragmentId(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI fragment identifier unescape operation
on a Reader input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriFragmentId(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI fragment identifier unescape operation
on a Reader input, writing results to a Writer.
|
static String |
unescapeUriFragmentId(String text) |
Perform am URI fragment identifier unescape operation
on a String input using UTF-8 as encoding.
|
static void |
unescapeUriFragmentId(String text,
java.io.Writer writer) |
Perform am URI fragment identifier unescape operation
on a String input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriFragmentId(String text,
java.io.Writer writer,
String encoding) |
Perform am URI fragment identifier unescape operation
on a String input, writing results to a Writer.
|
static String |
unescapeUriFragmentId(String text,
String encoding) |
Perform am URI fragment identifier unescape operation
on a String input.
|
static void |
unescapeUriPath(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI path unescape operation
on a char[] input using UTF-8 as encoding.
|
static void |
unescapeUriPath(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI path unescape operation
on a char[] input.
|
static void |
unescapeUriPath(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI path unescape operation
on a Reader input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriPath(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI path unescape operation
on a Reader input, writing results to a Writer.
|
static String |
unescapeUriPath(String text) |
Perform am URI path unescape operation
on a String input using UTF-8 as encoding.
|
static void |
unescapeUriPath(String text,
java.io.Writer writer) |
Perform am URI path unescape operation
on a String input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriPath(String text,
java.io.Writer writer,
String encoding) |
Perform am URI path unescape operation
on a String input, writing results to a Writer.
|
static String |
unescapeUriPath(String text,
String encoding) |
Perform am URI path unescape operation
on a String input.
|
static void |
unescapeUriPathSegment(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI path segment unescape operation
on a char[] input using UTF-8 as encoding.
|
static void |
unescapeUriPathSegment(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI path segment unescape operation
on a char[] input.
|
static void |
unescapeUriPathSegment(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI path segment unescape operation
on a Reader input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriPathSegment(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI path segment unescape operation
on a Reader input, writing results to a Writer.
|
static String |
unescapeUriPathSegment(String text) |
Perform am URI path segment unescape operation
on a String input using UTF-8 as encoding.
|
static void |
unescapeUriPathSegment(String text,
java.io.Writer writer) |
Perform am URI path segment unescape operation
on a String input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriPathSegment(String text,
java.io.Writer writer,
String encoding) |
Perform am URI path segment unescape operation
on a String input, writing results to a Writer.
|
static String |
unescapeUriPathSegment(String text,
String encoding) |
Perform am URI path segment unescape operation
on a String input.
|
static void |
unescapeUriQueryParam(char[] text,
int offset,
int len,
java.io.Writer writer) |
Perform am URI query parameter (name or value) unescape operation
on a char[] input using UTF-8 as encoding.
|
static void |
unescapeUriQueryParam(char[] text,
int offset,
int len,
java.io.Writer writer,
String encoding) |
Perform am URI query parameter (name or value) unescape operation
on a char[] input.
|
static void |
unescapeUriQueryParam(java.io.Reader reader,
java.io.Writer writer) |
Perform am URI query parameter (name or value) unescape operation
on a Reader input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriQueryParam(java.io.Reader reader,
java.io.Writer writer,
String encoding) |
Perform am URI query parameter (name or value) unescape operation
on a Reader input, writing results to a Writer.
|
static String |
unescapeUriQueryParam(String text) |
Perform am URI query parameter (name or value) unescape operation
on a String input using UTF-8 as encoding.
|
static void |
unescapeUriQueryParam(String text,
java.io.Writer writer) |
Perform am URI query parameter (name or value) unescape operation
on a String input using UTF-8 as encoding, writing results to a Writer.
|
static void |
unescapeUriQueryParam(String text,
java.io.Writer writer,
String encoding) |
Perform am URI query parameter (name or value) unescape operation
on a String input, writing results to a Writer.
|
static String |
unescapeUriQueryParam(String text,
String encoding) |
Perform am URI query parameter (name or value) unescape operation
on a String input.
|
public static final String DEFAULT_ENCODING
public static String escapeUriPath(String text)
Perform am URI path escape operation on a String input using UTF-8 as encoding.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.public static String escapeUriPath(String text, String encoding)
Perform am URI path escape operation on a String input.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.encoding
- the encoding to be used for unescaping.public static String escapeUriPathSegment(String text)
Perform am URI path segment escape operation on a String input using UTF-8 as encoding.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.public static String escapeUriPathSegment(String text, String encoding)
Perform am URI path segment escape operation on a String input.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.encoding
- the encoding to be used for escaping.public static String escapeUriQueryParam(String text)
Perform am URI query parameter (name or value) escape operation on a String input using UTF-8 as encoding.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.public static String escapeUriQueryParam(String text, String encoding)
Perform am URI query parameter (name or value) escape operation on a String input.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.encoding
- the encoding to be used for escaping.public static String escapeUriFragmentId(String text)
Perform am URI fragment identifier escape operation on a String input using UTF-8 as encoding.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.public static String escapeUriFragmentId(String text, String encoding)
Perform am URI fragment identifier escape operation on a String input.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.encoding
- the encoding to be used for escaping.public static void escapeUriPath(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI path escape operation on a String input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPath(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path escape operation on a String input, writing results to a Writer.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPathSegment(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI path segment escape operation on a String input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPathSegment(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path segment escape operation on a String input, writing results to a Writer.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriQueryParam(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI query parameter (name or value) escape operation on a String input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriQueryParam(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI query parameter (name or value) escape operation on a String input, writing results to a Writer.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriFragmentId(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI fragment identifier escape operation on a String input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriFragmentId(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI fragment identifier escape operation on a String input, writing results to a Writer.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the String to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPath(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI path escape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPath(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path escape operation on a Reader input, writing results to a Writer.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPathSegment(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI path segment escape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPathSegment(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path segment escape operation on a Reader input, writing results to a Writer.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriQueryParam(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI query parameter (name or value) escape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriQueryParam(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI query parameter (name or value) escape operation on a Reader input, writing results to a Writer.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriFragmentId(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI fragment identifier escape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriFragmentId(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI fragment identifier escape operation on a Reader input, writing results to a Writer.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
reader
- the Reader reading the text to be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPath(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI path escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPath(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path escape operation on a char[] input.
The following are the only allowed chars in an URI path (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPathSegment(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI path segment escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriPathSegment(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path segment escape operation on a char[] input.
The following are the only allowed chars in an URI path segment (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriQueryParam(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI query parameter (name or value) escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriQueryParam(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI query parameter (name or value) escape operation on a char[] input.
The following are the only allowed chars in an URI query parameter (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static void escapeUriFragmentId(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI fragment identifier escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void escapeUriFragmentId(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI fragment identifier escape operation on a char[] input.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
text
- the char[] to be escaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the escaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for escaping.java.io.IOException
- if an input/output exception occurspublic static String unescapeUriPath(String text)
Perform am URI path unescape operation on a String input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.public static String unescapeUriPath(String text, String encoding)
Perform am URI path unescape operation on a String input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use the specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.encoding
- the encoding to be used for unescaping.public static String unescapeUriPathSegment(String text)
Perform am URI path segment unescape operation on a String input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.public static String unescapeUriPathSegment(String text, String encoding)
Perform am URI path segment unescape operation on a String input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.encoding
- the encoding to be used for unescaping.public static String unescapeUriQueryParam(String text)
Perform am URI query parameter (name or value) unescape operation on a String input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.public static String unescapeUriQueryParam(String text, String encoding)
Perform am URI query parameter (name or value) unescape operation on a String input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.encoding
- the encoding to be used for unescaping.public static String unescapeUriFragmentId(String text)
Perform am URI fragment identifier unescape operation on a String input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.public static String unescapeUriFragmentId(String text, String encoding)
Perform am URI fragment identifier unescape operation on a String input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.encoding
- the encoding to be used for unescaping.public static void unescapeUriPath(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI path unescape operation on a String input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPath(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path unescape operation on a String input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use the specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPathSegment(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI path segment unescape operation on a String input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPathSegment(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path segment unescape operation on a String input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriQueryParam(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI query parameter (name or value) unescape operation on a String input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriQueryParam(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI query parameter (name or value) unescape operation on a String input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriFragmentId(String text, java.io.Writer writer) throws java.io.IOException
Perform am URI fragment identifier unescape operation on a String input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriFragmentId(String text, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI fragment identifier unescape operation on a String input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the String to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPath(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI path unescape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPath(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path unescape operation on a Reader input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use the specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPathSegment(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI path segment unescape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPathSegment(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path segment unescape operation on a Reader input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriQueryParam(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI query parameter (name or value) unescape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriQueryParam(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI query parameter (name or value) unescape operation on a Reader input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriFragmentId(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Perform am URI fragment identifier unescape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriFragmentId(java.io.Reader reader, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI fragment identifier unescape operation on a Reader input, writing results to a Writer.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
reader
- the Reader reading the text to be unescaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPath(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI path unescape operation on a char[] input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPath(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path unescape operation on a char[] input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPathSegment(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI path segment unescape operation on a char[] input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriPathSegment(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI path segment unescape operation on a char[] input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriQueryParam(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI query parameter (name or value) unescape operation on a char[] input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriQueryParam(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI query parameter (name or value) unescape operation on a char[] input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriFragmentId(char[] text, int offset, int len, java.io.Writer writer) throws java.io.IOException
Perform am URI fragment identifier unescape operation on a char[] input using UTF-8 as encoding.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use UTF-8 in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.java.io.IOException
- if an input/output exception occurspublic static void unescapeUriFragmentId(char[] text, int offset, int len, java.io.Writer writer, String encoding) throws java.io.IOException
Perform am URI fragment identifier unescape operation on a char[] input.
This method will unescape every percent-encoded (%HH) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters can be percent-encoded even if/when this is not required, though it is not generally considered a good practice).
This method will use specified encoding in order to determine the characters specified in the percent-encoded byte sequences.
This method is thread-safe.
text
- the char[] to be unescaped.offset
- the position in text at which the escape operation should start.len
- the number of characters in text that should be escaped.writer
- the java.io.Writer to which the unescaped result will be written. Nothing will
be written at all to this writer if input is null.encoding
- the encoding to be used for unescaping.java.io.IOException
- if an input/output exception occursCopyright © 2018 The UNBESCAPE team. All rights reserved.