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
  379a3e40_c6c8_5836_7be0_c1ffdac284d9["toLowercaseMap()"]
  cca5f017_2e30_72b9_fc2a_eca3446d8058["HttpConversionUtil"]
  379a3e40_c6c8_5836_7be0_c1ffdac284d9 -->|defined in| cca5f017_2e30_72b9_fc2a_eca3446d8058
  616d6333_d176_7624_5a45_c42cfec4f670["toHttp3Headers()"]
  616d6333_d176_7624_5a45_c42cfec4f670 -->|calls| 379a3e40_c6c8_5836_7be0_c1ffdac284d9
  style 379a3e40_c6c8_5836_7be0_c1ffdac284d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java lines 405–432

    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-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java.
Where is toLowercaseMap() defined?
toLowercaseMap() is defined in codec-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java at line 405.
What calls toLowercaseMap()?
toLowercaseMap() is called by 1 function(s): toHttp3Headers.

Analyze Your Own Codebase

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

Try Supermodel Free