if (!first) { sb.append("\n"); } else { first = false; }  sb.append(key).append(':').append(amzHeaders.get(key));
sb.append(key).append(':').append(amzHeaders.get(key)).append("\n");
	private static String getCanonicalizedAmzHeaders(ParameterList requestHeaders)	{		// Filter out all the AMZ headers required for AWS authentication		SortedMap<String, String> amzHeaders = new TreeMap<String, String>();		String headerName;		for (Parameter param : requestHeaders)		{			headerName = param.getName().toLowerCase();			if (headerName.equals("x-amz-date"))			{				// Ignore as we set the Date header.			}			else if (headerName.startsWith("x-amz-"))			{				if (!amzHeaders.containsKey(headerName))				{					amzHeaders.put(headerName, requestHeaders.getValues(headerName));				}			}		}		// Concatenate all AMZ headers		StringBuilder sb = new StringBuilder();		boolean first = true;		for (String key : amzHeaders.keySet())		{			if (!first)			{				sb.append("\n");			}			else			{				first = false;			}			sb.append(key).append(':').append(amzHeaders.get(key));		}		return sb.toString();	}