Package org.apache.commons.httpclient
Class HttpConstants
java.lang.Object
org.apache.commons.httpclient.HttpConstants
Deprecated.
use EncodingUtil class
HTTP content conversion routines.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
getAsciiBytes
(String data) Deprecated.Converts the specified string to byte array of ASCII characters.static String
getAsciiString
(byte[] data) Deprecated.Converts the byte array of ASCII characters to a string.static String
getAsciiString
(byte[] data, int offset, int length) Deprecated.Converts the byte array of ASCII characters to a string.static byte[]
Deprecated.Converts the specified string to a byte array of HTTP element characters.static byte[]
getContentBytes
(String data) Deprecated.Converts the specified string to a byte array of HTTP content characters using default HTTP content encoding (ISO-8859-1) This method is to be used when encoding content of HTTP request/responsestatic byte[]
getContentBytes
(String data, String charset) Deprecated.Converts the specified string to a byte array of HTTP content charachetrs This method is to be used when encoding content of HTTP request/response If the specified charset is not supported, default HTTP content encoding (ISO-8859-1) is appliedstatic String
getContentString
(byte[] data) Deprecated.Converts the byte array of HTTP content characters to a string using default HTTP content encoding (ISO-8859-1) This method is to be used when decoding content of HTTP request/responsestatic String
getContentString
(byte[] data, int offset, int length) Deprecated.Converts the byte array of HTTP content characters to a string using default HTTP content encoding (ISO-8859-1) This method is to be used when decoding content of HTTP request/responsestatic String
getContentString
(byte[] data, int offset, int length, String charset) Deprecated.Converts the byte array of HTTP content characters to a string This method is to be used when decoding content of HTTP request/response If the specified charset is not supported, default HTTP content encoding (ISO-8859-1) is appliedstatic String
getContentString
(byte[] data, String charset) Deprecated.Converts the byte array of HTTP content characters to a string This method is to be used when decoding content of HTTP request/response If the specified charset is not supported, default HTTP content encoding (ISO-8859-1) is appliedstatic String
getString
(byte[] data) Deprecated.Converts the byte array of HTTP element characters to a string This method is to be used when decoding content of HTTP elements (such as response headers)static String
getString
(byte[] data, int offset, int length) Deprecated.Converts the byte array of HTTP element characters to a string This method is to be used when decoding content of HTTP elements (such as response headers)
-
Field Details
-
HTTP_ELEMENT_CHARSET
Deprecated.Character set used to encode HTTP protocol elements- See Also:
-
DEFAULT_CONTENT_CHARSET
Deprecated.Default content encoding chatset- See Also:
-
-
Constructor Details
-
HttpConstants
public HttpConstants()Deprecated.
-
-
Method Details
-
getBytes
Deprecated.Converts the specified string to a byte array of HTTP element characters. This method is to be used when encoding content of HTTP elements (such as request headers)- Parameters:
data
- the string to be encoded- Returns:
- The resulting byte array.
-
getString
Deprecated.Converts the byte array of HTTP element characters to a string This method is to be used when decoding content of HTTP elements (such as response headers)- Parameters:
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encode- Returns:
- The resulting string.
-
getString
Deprecated.Converts the byte array of HTTP element characters to a string This method is to be used when decoding content of HTTP elements (such as response headers)- Parameters:
data
- the byte array to be encoded- Returns:
- The resulting string.
-
getContentBytes
Deprecated.Converts the specified string to a byte array of HTTP content charachetrs This method is to be used when encoding content of HTTP request/response If the specified charset is not supported, default HTTP content encoding (ISO-8859-1) is applied- Parameters:
data
- the string to be encodedcharset
- the desired character encoding- Returns:
- The resulting byte array.
-
getContentString
Deprecated.Converts the byte array of HTTP content characters to a string This method is to be used when decoding content of HTTP request/response If the specified charset is not supported, default HTTP content encoding (ISO-8859-1) is applied- Parameters:
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encodecharset
- the desired character encoding- Returns:
- The result of the conversion.
-
getContentString
Deprecated.Converts the byte array of HTTP content characters to a string This method is to be used when decoding content of HTTP request/response If the specified charset is not supported, default HTTP content encoding (ISO-8859-1) is applied- Parameters:
data
- the byte array to be encodedcharset
- the desired character encoding- Returns:
- The result of the conversion.
-
getContentBytes
Deprecated.Converts the specified string to a byte array of HTTP content characters using default HTTP content encoding (ISO-8859-1) This method is to be used when encoding content of HTTP request/response- Parameters:
data
- the string to be encoded- Returns:
- The byte array as above.
-
getContentString
Deprecated.Converts the byte array of HTTP content characters to a string using default HTTP content encoding (ISO-8859-1) This method is to be used when decoding content of HTTP request/response- Parameters:
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encode- Returns:
- The string representation of the byte array.
-
getContentString
Deprecated.Converts the byte array of HTTP content characters to a string using default HTTP content encoding (ISO-8859-1) This method is to be used when decoding content of HTTP request/response- Parameters:
data
- the byte array to be encoded- Returns:
- The string representation of the byte array.
-
getAsciiBytes
Deprecated.Converts the specified string to byte array of ASCII characters.- Parameters:
data
- the string to be encoded- Returns:
- The string as a byte array.
-
getAsciiString
Deprecated.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)- Parameters:
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encode- Returns:
- The string representation of the byte array
-
getAsciiString
Deprecated.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)- Parameters:
data
- the byte array to be encoded- Returns:
- The string representation of the byte array
-