FileDocCategorySizeDatePackage
AuthParams.javaAPI DocAndroid 1.5 API3244Wed May 06 22:41:10 BST 2009org.apache.http.auth.params

AuthParams

public final class AuthParams extends Object
This class implements an adaptor around the {@link HttpParams} interface to simplify manipulation of the HTTP authentication specific parameters.
author
Oleg Kalnichevski
version
$Revision: 618365 $
since
4.0
see
AuthPNames

Fields Summary
Constructors Summary
private AuthParams()

        super();
    
Methods Summary
public static java.lang.StringgetCredentialCharset(org.apache.http.params.HttpParams params)
Obtains the charset for encoding {@link org.apache.http.auth.Credentials}. If not configured, {@link HTTP#DEFAULT_PROTOCOL_CHARSET HTTP.DEFAULT_PROTOCOL_CHARSET} is used instead.

return
The charset
see
AuthPNames#CREDENTIAL_CHARSET

        if (params == null) {
            throw new IllegalArgumentException("HTTP parameters may not be null");
        }
        String charset = (String) params.getParameter
            (AuthPNames.CREDENTIAL_CHARSET);
        //@@@ TODO: inconsistent with JavaDoc in AuthPNames,
        //@@@ TODO: check HTTP_ELEMENT_CHARSET first, or fix JavaDocs
        if (charset == null) {
            charset = HTTP.DEFAULT_PROTOCOL_CHARSET;
        }
        return charset;
    
public static voidsetCredentialCharset(org.apache.http.params.HttpParams params, java.lang.String charset)
Sets the charset to be used when encoding {@link org.apache.http.auth.Credentials}.

param
charset The charset

        if (params == null) {
            throw new IllegalArgumentException("HTTP parameters may not be null");
        }
        params.setParameter(AuthPNames.CREDENTIAL_CHARSET, charset);