public static String serializeDigestResponse(Map<String,String> paramMap){
  StringBuilder sb=new StringBuilder("Digest ");
  boolean prefixComma=false;
  for (  Map.Entry<String,String> entry : paramMap.entrySet()) {
    if (!prefixComma) {
      prefixComma=true;
    }
 else {
      sb.append(", ");
    }
    sb.append(entry.getKey());
    sb.append("=");
    sb.append(entry.getValue());
  }
  return sb.toString();
}

public static String serializeDigestResponse ( Map < String , String > paramMap ) { StringBuilder sb = new StringBuilder ( "Digest " ) ; boolean prefixComma = false ; for ( Map . Entry < String , String > entry : paramMap . entrySet ( ) ) { if ( ! prefixComma ) { prefixComma = true ; } else { sb . append ( ", " ) ; } sb . append ( entry . getKey ( ) ) ; sb . append ( "=" ) ; sb . append ( entry . getValue ( ) ) ; } return sb . toString ( ) ; }
serialize a parameter map into a digest response . this is used as the " authorization " header in the request . all parameters in the supplied map will be added to the header .
