Home / Function/ toLowercaseMap() — netty Function Reference

toLowercaseMap() — netty Function Reference

Architecture documentation for the toLowercaseMap() function in HttpConversionUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9ef85cd2_4d7c_e875_6493_f1c7033de54a["toLowercaseMap()"]
  0560b510_c1dc_0a46_6dca_e5dbfb67d807["HttpConversionUtil"]
  9ef85cd2_4d7c_e875_6493_f1c7033de54a -->|defined in| 0560b510_c1dc_0a46_6dca_e5dbfb67d807
  6d71d73b_826f_80a2_d574_05df829c5c40["toHttp2Headers()"]
  6d71d73b_826f_80a2_d574_05df829c5c40 -->|calls| 9ef85cd2_4d7c_e875_6493_f1c7033de54a
  style 9ef85cd2_4d7c_e875_6493_f1c7033de54a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java lines 469–496

    private static CharSequenceMap<AsciiString> toLowercaseMap(Iterator<? extends CharSequence> valuesIter,
                                                               int arraySizeHint) {
        UnsupportedValueConverter<AsciiString> valueConverter = UnsupportedValueConverter.<AsciiString>instance();
        CharSequenceMap<AsciiString> result = new CharSequenceMap<AsciiString>(true, valueConverter, arraySizeHint);

        while (valuesIter.hasNext()) {
            AsciiString lowerCased = AsciiString.of(valuesIter.next()).toLowerCase();
            try {
                int index = lowerCased.forEachByte(FIND_COMMA);
                if (index != -1) {
                    int start = 0;
                    do {
                        result.add(lowerCased.subSequence(start, index, false).trim(), EMPTY_STRING);
                        start = index + 1;
                    } while (start < lowerCased.length() &&
                             (index = lowerCased.forEachByte(start, lowerCased.length() - start, FIND_COMMA)) != -1);
                    result.add(lowerCased.subSequence(start, lowerCased.length(), false).trim(), EMPTY_STRING);
                } else {
                    result.add(lowerCased.trim(), EMPTY_STRING);
                }
            } catch (Exception e) {
                // This is not expect to happen because FIND_COMMA never throws but must be caught
                // because of the ByteProcessor interface.
                throw new IllegalStateException(e);
            }
        }
        return result;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does toLowercaseMap() do?
toLowercaseMap() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java.
Where is toLowercaseMap() defined?
toLowercaseMap() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java at line 469.
What calls toLowercaseMap()?
toLowercaseMap() is called by 1 function(s): toHttp2Headers.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free