microsoft-azure-storage/src/com/microsoft/azure/storage/core/Canonicalizer.java
private static ArrayList<String> getHeaderValues(final Map<String, List<String>> headers, final String headerName) {

        final ArrayList<String> arrayOfValues = new ArrayList<String>();
        List<String> values = null;

        for (final Entry<String, List<String>> entry : headers.entrySet()) {
            if (entry.getKey().toLowerCase(Utility.LOCALE_US).equals(headerName)) {
                values = entry.getValue();
                break;
            }
        }
        if (values != null) {
            for (final String value : values) {
                // canonicalization formula requires the string to be left
                // trimmed.
                arrayOfValues.add(Utility.trimStart(value));
            }
        }
        return arrayOfValues;
    }
private static ArrayList<String> getHeaderValues(final Map<String, List<String>> headers, final String headerName) {

        final ArrayList<String> arrayOfValues = new ArrayList<String>();
        List<String> values = null;

        for (final Entry<String, List<String>> entry : headers.entrySet()) {
            if (entry.getKey().toLowerCase(Utility.LOCALE_US).equals(headerName)) {
                values = entry.getValue();
                break;
            }
        }
        if (values != null) {
            for (final String value : values) {
                // canonicalization formula requires the string to be left
                // trimmed.
                arrayOfValues.add(Utility.trimStart(value));
            }
        }
        return arrayOfValues;
    }
private static ArrayList < String > getHeaderValues ( final Map < String , List < String > > headers , final String headerName ) { final ArrayList < String > arrayOfValues = new ArrayList < String > ( ) ; List < String > values = null ; for ( final Entry < String , List < String > > entry : headers . entrySet ( ) ) { if ( entry . getKey ( ) . toLowerCase ( Utility . LOCALE_US ) . equals ( headerName ) ) { values = entry . getValue ( ) ; break ; } } if ( values != null ) { for ( final String value : values ) { // canonicalization formula requires the string to be left // trimmed. arrayOfValues . add ( Utility . trimStart ( value ) ) ; } } return arrayOfValues ; }
Gets all the values for the given header in the one to many map, performs a trimStart() on each return value

@param headers
a one to many map of key / values representing the header values for the connection.
@param headerName
the name of the header to lookup
@return an ArrayList<String> of all trimmed values corresponding to the requested headerName. This may be empty
if the header is not found.
Gets all the values for the given header in the one to many map performs a trimStart () on each return value