DefaultHeaders.java — netty Source File
Architecture documentation for DefaultHeaders.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2014 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License, version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package io.netty.handler.codec;
import io.netty.util.HashingStrategy;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.function.BiPredicate;
import static io.netty.util.HashingStrategy.JAVA_HASHER;
import static io.netty.util.internal.MathUtil.findNextPositivePowerOfTwo;
import static io.netty.util.internal.ObjectUtil.checkNotNull;
import static java.lang.Math.max;
import static java.lang.Math.min;
/**
* Default implementation of {@link Headers};
*
* @param <K> the type of the header name.
* @param <V> the type of the header value.
* @param <T> the type to use for return values when the intention is to return {@code this} object.
*/
public class DefaultHeaders<K, V, T extends Headers<K, V, T>> implements Headers<K, V, T> {
/**
* Constant used to seed the hash code generation. Could be anything but this was borrowed from murmur3.
*/
static final int HASH_CODE_SEED = 0xc2b2ae35;
private final HeaderEntry<K, V>[] entries;
protected final HeaderEntry<K, V> head;
private final byte hashMask;
private final ValueConverter<V> valueConverter;
private final NameValidator<K> nameValidator;
private final ValueValidator<V> valueValidator;
private final HashingStrategy<K> hashingStrategy;
int size;
public interface NameValidator<K> {
// ... (1415 more lines)
Domain
Subdomains
Source
Frequently Asked Questions
What does DefaultHeaders.java do?
DefaultHeaders.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is DefaultHeaders.java in the architecture?
DefaultHeaders.java is located at codec-base/src/main/java/io/netty/handler/codec/DefaultHeaders.java (domain: Buffer, subdomain: Allocators, directory: codec-base/src/main/java/io/netty/handler/codec).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free