org.apache.commons.httpclient.util
public class EncodingUtil extends Object
Since: 2.0 final
Method Summary | |
---|---|
static String | formUrlEncode(NameValuePair[] pairs, String charset)
Form-urlencoding routine.
|
static byte[] | getAsciiBytes(String data)
Converts the specified string to byte array of ASCII characters.
|
static String | getAsciiString(byte[] data, int offset, int length)
Converts the byte array of ASCII characters to a string. |
static String | getAsciiString(byte[] data)
Converts the byte array of ASCII characters to a string. |
static byte[] | getBytes(String data, String charset)
Converts the specified string to a byte array. |
static String | getString(byte[] data, int offset, int length, String charset)
Converts the byte array of HTTP content characters to a string. |
static String | getString(byte[] data, String charset)
Converts the byte array of HTTP content characters to a string. |
if the given charset is not supported, ISO-8859-1 is used instead.
Parameters: pairs the values to be encoded charset the character set of pairs to be encoded
Returns: the urlencoded pairs
Since: 2.0 final
Parameters: data the string to be encoded
Returns: The string as a byte array.
Since: 3.0
Parameters: data the byte array to be encoded offset the index of the first byte to encode length the number of bytes to encode
Returns: The string representation of the byte array
Since: 3.0
Parameters: data the byte array to be encoded
Returns: The string representation of the byte array
Since: 3.0
Parameters: data the string to be encoded charset the desired character encoding
Returns: The resulting byte array.
Since: 3.0
Parameters: data the byte array to be encoded offset the index of the first byte to encode length the number of bytes to encode charset the desired character encoding
Returns: The result of the conversion.
Since: 3.0
Parameters: data the byte array to be encoded charset the desired character encoding
Returns: The result of the conversion.
Since: 3.0