Static Public Member Functions | |
static String | encodeBasicAuthentication (String pUser, String pPassword, String pEncoding) throws UnsupportedEncodingException |
static String | getNonIdentityTransferEncoding (String pHeaderValue) |
static boolean | isUsingGzipEncoding (String pHeaderValue) |
static boolean | isUsingGzipEncoding (Enumeration pValues) |
static void | parseAuthorization (XmlRpcHttpRequestConfigImpl pConfig, String pLine) |
static String | readLine (InputStream pIn, byte[] pBuffer) throws IOException |
Provides utility functions useful in HTTP communications
Definition at line 34 of file HttpUtil.java.
static String org.apache.xmlrpc.util.HttpUtil.encodeBasicAuthentication | ( | String | pUser, |
String | pPassword, | ||
String | pEncoding | ||
) | throws UnsupportedEncodingException [inline, static] |
Creates the Base64 encoded credentials for HTTP Basic Authentication.
pUser | User name, or null, if no Basic Authentication is being used. |
pPassword | Users password, or null, if no Basic Authentication is being used. |
pEncoding | Encoding being used for conversion of the credential string into a byte array. |
UnsupportedEncodingException | The encoding pEncoding is invalid. |
Definition at line 42 of file HttpUtil.java.
static String org.apache.xmlrpc.util.HttpUtil.getNonIdentityTransferEncoding | ( | String | pHeaderValue | ) | [inline, static] |
Returns, whether the HTTP header value pHeaderValue
indicates, that another encoding than "identity" is used. This is typically the value of "Transfer-Encoding", or "TE".
Definition at line 85 of file HttpUtil.java.
static boolean org.apache.xmlrpc.util.HttpUtil.isUsingGzipEncoding | ( | String | pHeaderValue | ) | [inline, static] |
Returns, whether the HTTP header value pHeaderValue
indicates, that GZIP encoding is used or may be used.
pHeaderValue | The HTTP header value being parsed. This is typically the value of "Content-Encoding", or "Accept-Encoding". |
Definition at line 61 of file HttpUtil.java.
static boolean org.apache.xmlrpc.util.HttpUtil.isUsingGzipEncoding | ( | Enumeration | pValues | ) | [inline, static] |
Returns, whether the HTTP header values in pValues
indicate, that GZIP encoding is used or may be used.
pValues | The HTTP header values being parsed. These are typically the values of "Content-Encoding", or "Accept-Encoding". |
Definition at line 109 of file HttpUtil.java.
static void org.apache.xmlrpc.util.HttpUtil.parseAuthorization | ( | XmlRpcHttpRequestConfigImpl | pConfig, |
String | pLine | ||
) | [inline, static] |
Parses an "Authorization" header and adds the username and password to pConfig
.
pConfig | The request configuration being created. |
pLine | The header being parsed, including the "basic" part. |
Definition at line 152 of file HttpUtil.java.
static String org.apache.xmlrpc.util.HttpUtil.readLine | ( | InputStream | pIn, |
byte[] | pBuffer | ||
) | throws IOException [inline, static] |
Reads a header line from the input stream pIn
and converts it into a string.
pIn | The input stream being read. |
pBuffer | A buffer being used for temporary storage. The buffers length is a limit of the header lines length. |
IOException | Reading the header line failed. |
Definition at line 129 of file HttpUtil.java.