public class HttpConstants extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONTENT_CHARSET
Deprecated.
Default content encoding chatset
|
static String |
HTTP_ELEMENT_CHARSET
Deprecated.
Character set used to encode HTTP protocol elements
|
Constructor and Description |
---|
HttpConstants()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static 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[] |
getBytes(String data)
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/response
|
static 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 applied
|
static 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/response
|
static 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/response
|
static 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 applied
|
static 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 applied
|
static 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)
|
public static final String HTTP_ELEMENT_CHARSET
public static final String DEFAULT_CONTENT_CHARSET
public static byte[] getBytes(String data)
data
- the string to be encodedpublic static String getString(byte[] data, int offset, int length)
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encodepublic static String getString(byte[] data)
data
- the byte array to be encodedpublic static byte[] getContentBytes(String data, String charset)
data
- the string to be encodedcharset
- the desired character encodingpublic static String getContentString(byte[] data, int offset, int length, String charset)
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encodecharset
- the desired character encodingpublic static String getContentString(byte[] data, String charset)
data
- the byte array to be encodedcharset
- the desired character encodingpublic static byte[] getContentBytes(String data)
data
- the string to be encodedpublic static String getContentString(byte[] data, int offset, int length)
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encodepublic static String getContentString(byte[] data)
data
- the byte array to be encodedpublic static byte[] getAsciiBytes(String data)
data
- the string to be encodedpublic static String getAsciiString(byte[] data, int offset, int length)
data
- the byte array to be encodedoffset
- the index of the first byte to encodelength
- the number of bytes to encodepublic static String getAsciiString(byte[] data)
data
- the byte array to be encodedCopyright © 2010 - 2020 Adobe. All Rights Reserved