APIdia Launch Partner
Top Methods
jdk.internal.net.http.qpack

public sealed Interface HeadersTable

permits StaticTable, DynamicTable
Known Direct Implementers
jdk.internal.net.http.qpack.StaticTable, jdk.internal.net.http.qpack.DynamicTable

Method Summary

Modifier and TypeMethod and Description
public HeaderField

Returns:

table entry
get
(long
an entry unique index
index
)

Get a table entry with specified unique index.

public long

Returns:

unique index of entry added to the table. If element cannot be added -1 is returned.
insert
(String
header name
name
,
String
header value
value
)

Add an entry to the table.

public long

Returns:

a non-zero value if a matching entry is found, 0 otherwise
search
(String
a name to search for
name
,
String
a value to search for
value
)

Returns an index for name:value pair, or just name in a headers table.

Method Detail

getback to summary
public HeaderField get(long index)

Get a table entry with specified unique index.

Parameters
index:long

an entry unique index

Returns:HeaderField

table entry

insertback to summary
public long insert(String name, String value)

Add an entry to the table.

Parameters
name:String

header name

value:String

header value

Returns:long

unique index of entry added to the table. If element cannot be added -1 is returned.

searchback to summary
public long search(String name, String value)

Returns an index for name:value pair, or just name in a headers table. The contract for return values is the following: - a positive integer i where i - 1 is an index of an entry with a header (n, v), where n.equals(name) && v.equals(value).

- a negative integer j where -j - 1 is an index of an entry with a header (n, v), where n.equals(name).

- 0 if there's no entry 'e' found such that e.getName().equals(name)

Parameters
name:String

a name to search for

value:String

a value to search for

Returns:long

a non-zero value if a matching entry is found, 0 otherwise