Static Public Member Functions
org.apache.xmlrpc.util.HttpUtil Class Reference

List of all members.

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

Detailed Description

Provides utility functions useful in HTTP communications

Definition at line 34 of file HttpUtil.java.


Member Function Documentation

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.

Parameters:
pUserUser name, or null, if no Basic Authentication is being used.
pPasswordUsers password, or null, if no Basic Authentication is being used.
pEncodingEncoding being used for conversion of the credential string into a byte array.
Returns:
Base64 encoded credentials, for use in the HTTP header
Exceptions:
UnsupportedEncodingExceptionThe 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".

Returns:
Null, if the transfer encoding in use is "identity". Otherwise, another transfer encoding.

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.

Parameters:
pHeaderValueThe HTTP header value being parsed. This is typically the value of "Content-Encoding", or "Accept-Encoding".
Returns:
True, if the header value suggests that GZIP encoding is or may be used.

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.

Parameters:
pValuesThe HTTP header values being parsed. These are typically the values of "Content-Encoding", or "Accept-Encoding".
Returns:
True, if the header values suggests that GZIP encoding is or may be used.

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.

Parameters:
pConfigThe request configuration being created.
pLineThe 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.

Parameters:
pInThe input stream being read.
pBufferA buffer being used for temporary storage. The buffers length is a limit of the header lines length.
Returns:
Next header line or null, if no more header lines are available.
Exceptions:
IOExceptionReading the header line failed.

Definition at line 129 of file HttpUtil.java.


The documentation for this class was generated from the following file:


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:50