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 -- ) { HpackHeaderField entry = getEntry ( index ) ; CharSequence name = entry . name ; ret . set ( name , index ) ; } return ret ; }
create a map CharSequenceMap header name to index value to allow quick lookup