protected String buildBasicAuthValue(String user, String password){
		StringBuilder sb = new StringBuilder();
		if (StringUtils.isNotEmpty(user)){
			sb.append(user);
		}
		if (StringUtils.isNotEmpty(password)){
			if (sb.length() > 0){
				sb.append(':');
			}
			sb.append(password);
		}
		return buildBasicAuthValue(sb.toString());
	}
protected String buildBasicAuthValue ( String user , String password ) { StringBuilder sb = new StringBuilder ( ) ; if ( StringUtils . isNotEmpty ( user ) ) { sb . append ( user ) ; } if ( StringUtils . isNotEmpty ( password ) ) { if ( sb . length ( ) > 0 ) { sb . append ( ':' ) ; } sb . append ( password ) ; } return buildBasicAuthValue ( sb . toString ( ) ) ; }
Build the value to be used in HTTP Basic Authentication header
@param user			the user name, may be null or empty
@param password		the password, may be null or empty
@return	the value to be used for header 'Authorization'