Package com.inrupt.client
Class Headers
java.lang.Object
com.inrupt.client.Headers
- All Implemented Interfaces:
Serializable
A read-only view of a collection of HTTP headers.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA class for representing an HTTP Link header.static final classa class for parsing WAC-allow headers.static final classPart of the HTTP Challenge and Response authentication framework, this class represents a challenge object as represented in a WWW-Authenticate Response Header. -
Method Summary
Modifier and TypeMethodDescriptionGet all values for a header.asMap()Get the header values as a Java Map.static Headersempty()Create an empty headers object.firstValue(String name) Get the first value of a header, if it exists.static HeadersCreate a headers object from an existing Java Map.
-
Method Details
-
firstValue
Get the first value of a header, if it exists.- Parameters:
name- the header name- Returns:
- the first value, if present
-
allValues
Get all values for a header.- Parameters:
name- the header name- Returns:
- the values for the header. If no values are present, an empty list will be returned
-
asMap
Get the header values as a Java Map.- Returns:
- the header values
-
of
Create a headers object from an existing Java Map.- Parameters:
headers- the headers represented as a Map- Returns:
- the new Headers object
-
empty
Create an empty headers object.- Returns:
- the new Headers object
-