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.
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;