Package org.apache.iceberg.rest
Interface HTTPHeaders
@Immutable
public interface HTTPHeaders
Represents a group of HTTP headers.
Header name comparison in this class is always case-insensitive, in accordance with RFC 2616.
This class exposes methods to convert to and from different representations such as maps and multimap, for easier access and manipulation – especially when dealing with multiple headers with the same name.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Represents an HTTP header as a name-value pair. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Returns whether this group contains an entry with the given name (case-insensitive).entries()
Returns all the header entries in this group.default Set<HTTPHeaders.HTTPHeader>
Returns all the entries in this group for the given name (case-insensitive).static HTTPHeaders
static HTTPHeaders
of
(HTTPHeaders.HTTPHeader... headers) default HTTPHeaders
putIfAbsent
(HTTPHeaders headers) Adds the given headers to the current group if no entries with same names are already present.default HTTPHeaders
putIfAbsent
(HTTPHeaders.HTTPHeader header) Adds the given header to the current group if no entry with the same name is already present.
-
Field Details
-
EMPTY
-
-
Method Details
-
entries
Set<HTTPHeaders.HTTPHeader> entries()Returns all the header entries in this group. -
entries
Returns all the entries in this group for the given name (case-insensitive). -
contains
Returns whether this group contains an entry with the given name (case-insensitive). -
putIfAbsent
Adds the given header to the current group if no entry with the same name is already present. Returns a new instance with the added header, or the current instance if the header is already present. -
putIfAbsent
Adds the given headers to the current group if no entries with same names are already present. Returns a new instance with the added headers, or the current instance if all headers are already present. -
of
-
of
-