| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | Returns: The string as a byte array.the string to be encoded data)Converts the specified string to byte array of ASCII characters. |
| public static String | Returns: The string representation of the byte arraythe byte array to be encoded data, final int the index of the first byte to encode offset, final int the number of bytes to encode length)Converts the byte array of ASCII characters to a string. |
| public static String | Returns: The string representation of the byte arraythe byte array to be encoded data)Converts the byte array of ASCII characters to a string. |
| public static byte[] | |
| public static String | Returns: The result of the conversion.the byte array to be encoded data, final int the index of the first byte to encode offset, final int the number of bytes to encode length, final String the desired character encoding charset)Converts the byte array of HTTP content characters to a string. |
| public static String |
| EncodingUtils | back to summary |
|---|---|
| private EncodingUtils() This class should not be instantiated. | |
| getAsciiBytes | back to summary |
|---|---|
| public static byte[] getAsciiBytes(final String data) Converts the specified string to byte array of ASCII characters.
| |
| getAsciiString | back to summary |
|---|---|
| public static String getAsciiString(final byte[] data, final int offset, final int length) Converts the byte array of ASCII characters to a string. This method is to be used when decoding content of HTTP elements (such as response headers)
| |
| getAsciiString | back to summary |
|---|---|
| public static String getAsciiString(final byte[] data) Converts the byte array of ASCII characters to a string. This method is to be used when decoding content of HTTP elements (such as response headers)
| |
| getBytes | back to summary |
|---|---|
| public static byte[] getBytes(final String data, final String charset) Converts the specified string to a byte array. If the charset is not supported the default system charset is used. | |
| getString | back to summary |
|---|---|
| public static String getString(final byte[] data, final int offset, final int length, final String charset) Converts the byte array of HTTP content characters to a string. If the specified charset is not supported, default system encoding is used. | |
| getString | back to summary |
|---|---|
| public static String getString(final byte[] data, final String charset) Converts the byte array of HTTP content characters to a string. If the specified charset is not supported, default system encoding is used. | |