Example usage for io.netty.handler.codec.http2 CharSequenceMap CharSequenceMap

List of usage examples for io.netty.handler.codec.http2 CharSequenceMap CharSequenceMap

Introduction

In this page you can find the example usage for io.netty.handler.codec.http2 CharSequenceMap CharSequenceMap.

Prototype

@SuppressWarnings("unchecked")
    public CharSequenceMap(boolean caseSensitive, ValueConverter<V> valueConverter, int arraySizeHint) 

Source Link

Usage

From source file:io.grpc.netty.GrpcHpackStaticTable.java

License:Apache License

private static CharSequenceMap<Integer> createMap() {
    int length = STATIC_TABLE.size();
    @SuppressWarnings("unchecked")
    CharSequenceMap<Integer> ret = new CharSequenceMap<Integer>(true,
            UnsupportedValueConverter.<Integer>instance(), length);
    // Iterate through the static table in reverse order to
    // save the smallest index for a given name in the map.
    for (int index = length; index > 0; index--) {
        GrpcHpackHeaderField entry = getEntry(index);
        CharSequence name = entry.name;
        ret.set(name, index);//w  w w  .  j ava 2  s .c om
    }
    return ret;
}