RFC 5987 builds on RFC 2231, but has lesser scope like mandatory charset definition and no parameter continuation
| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | HEX_DECODE
The Hexadecimal decode value. |
| private static final char[] | HEX_DIGITS
The Hexadecimal values char array. |
| private static final byte | MASK
The Hexadecimal representation of 127. |
| private static final int | MASK_128
The Hexadecimal representation of 128. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: Decoded text based on charset encoding- Text to be decoded has a format of encodedText)<charset>'<language>'<encoded_value>
and ASCII onlyDecode a string of text obtained from a HTTP header as per RFC 2231 Eg 1. |
| private static byte[] | |
| private static String | |
| public static boolean | Returns: true, if encoded as per RFC 2231, false otherwiseThe parameter, which is being checked. paramName)Checks if Asterisk (*) at the end of parameter name to indicate, if it has charset and language information to decode the value. |
| public static String | Returns: strippedparamName of Asterisk (*), if RFC2231 encodedThe parameter, which is being inspected. paramName)If |
| HEX_DECODE | back to summary |
|---|---|
| private static final byte[] HEX_DECODE The Hexadecimal decode value. | |
| HEX_DIGITS | back to summary |
|---|---|
| private static final char[] HEX_DIGITS The Hexadecimal values char array. | |
| MASK | back to summary |
|---|---|
| private static final byte MASK The Hexadecimal representation of 127. | |
| MASK_128 | back to summary |
|---|---|
| private static final int MASK_128 The Hexadecimal representation of 128. | |
| RFC2231Utility | back to summary |
|---|---|
| private RFC2231Utility() Private constructor so that no instances can be created. This class contains only static utility methods. | |
| decodeText | back to summary |
|---|---|
| public static String decodeText(final String encodedText) throws UnsupportedEncodingException Decode a string of text obtained from a HTTP header as per RFC 2231
Eg 1.
Eg 2.
Eg 3.
| |
| fromHex | back to summary |
|---|---|
| private static byte[] fromHex(final String text) Convert
| |
| getJavaCharset | back to summary |
|---|---|
| private static String getJavaCharset(final String mimeCharset) | |
| hasEncodedValue | back to summary |
|---|---|
| public static boolean hasEncodedValue(final String paramName) Checks if Asterisk (*) at the end of parameter name to indicate, if it has charset and language information to decode the value.
| |
| stripDelimiter | back to summary |
|---|---|
| public static String stripDelimiter(final String paramName) If | |