| Modifier and Type | Field and Description |
|---|---|
static String |
ACCEPT_ENCODING |
static String |
AUTHORIZATION |
static String |
CONTENT_ENCODING |
static String |
CONTENT_LENGTH |
static String |
CONTENT_MD5 |
static String |
CONTENT_TYPE |
static String |
HOST |
static String |
USER_AGENT |
static String |
X_AMZ_CHECKSUM_SHA256 |
static String |
X_AMZ_CONTENT_SHA256 |
static String |
X_AMZ_COPY_SOURCE_RANGE |
static String |
X_AMZ_DATE |
static String |
X_AMZ_SDK_CHECKSUM_ALGORITHM |
static String |
X_AMZ_SECURITY_TOKEN |
| Constructor and Description |
|---|
Headers()
Creates empty headers.
|
Headers(Http.Headers source)
Creates headers as copy of the specified source.
|
Headers(Map<String,String> source)
Creates headers as copy of the specified source.
|
Headers(com.google.common.collect.Multimap<String,String> source)
Creates headers as copy of the specified source.
|
Headers(String... keysAndValues)
Creates headers by alternating names and values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
String value)
Adds the specified value to the name in this headers.
|
void |
clear()
Clears all names and values in this headers.
|
boolean |
contains(String name)
Checks whether the specified name exists in this headers.
|
boolean |
containsKey(String name)
Checks whether the specified name exists in this headers.
|
Set<Map.Entry<String,String>> |
entries()
Gets Set of Map.Entry of this headers.
|
Set<Map.Entry<String,String>> |
entrySet()
Gets Set of Map.Entry of this headers.
|
boolean |
equals(Object o) |
Set<String> |
get(String name)
Gets set of values of the specified name in this headers.
|
String |
getFirst(String name)
Gets the first value of the specified name in this headers.
|
int |
hashCode() |
Iterator<Map.Entry<String,String>> |
iterator()
Gets iterator of this headers.
|
Set<String> |
keySet()
Gets set of values of the specified name in this headers.
|
static Http.Headers |
merge(Http.Headers... headersList)
Creates new headers by merging names and values from the specified headers list.
|
boolean |
namePrefixAny(String prefix)
Checks whether any name in this headers starts with the specified prefix or not.
|
Set<String> |
names()
Gets all names in this headers.
|
boolean |
put(String name,
List<String> values)
Adds list of values for the specified name to this headers.
|
boolean |
put(String name,
Set<String> values)
Adds set of values for the specified name to this headers.
|
boolean |
put(String name,
String value)
Adds the specified value to the name in this headers.
|
Http.Headers |
putAll(Http.Headers source)
Adds all names and values from the specified source to this headers.
|
Http.Headers |
putAll(Map<String,String> source)
Adds all names and values from the specified source to this headers.
|
Http.Headers |
putAll(com.google.common.collect.Multimap<String,String> source)
Adds all names and values from the specified source to this headers.
|
Set<String> |
remove(String name)
Removes the specified name from this headers.
|
boolean |
remove(String name,
String value)
Removes the specified value of the specified name from this headers.
|
boolean |
removeAll(String name)
Removes the specified name from this headers.
|
void |
set(String name,
String value)
Sets the specified name and value in this headers.
|
int |
size()
Gets size of this headers.
|
okhttp3.Headers |
toHttpHeaders()
Gets new okhttp3.Headers by populating this headers.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String ACCEPT_ENCODING
public static final String AUTHORIZATION
public static final String CONTENT_ENCODING
public static final String CONTENT_LENGTH
public static final String CONTENT_MD5
public static final String CONTENT_TYPE
public static final String HOST
public static final String USER_AGENT
public static final String X_AMZ_CHECKSUM_SHA256
public static final String X_AMZ_CONTENT_SHA256
public static final String X_AMZ_COPY_SOURCE_RANGE
public static final String X_AMZ_DATE
public static final String X_AMZ_SDK_CHECKSUM_ALGORITHM
public static final String X_AMZ_SECURITY_TOKEN
public Headers()
public Headers(Http.Headers source)
public Headers(com.google.common.collect.Multimap<String,String> source)
public Headers(String... keysAndValues)
public static Http.Headers merge(Http.Headers... headersList)
public void add(@Nonnull String name, @Nonnull String value)
public void set(@Nonnull String name, @Nonnull String value)
public String getFirst(String name)
public boolean contains(String name)
public boolean namePrefixAny(String prefix)
public okhttp3.Headers toHttpHeaders()
public void clear()
public boolean containsKey(String name)
public boolean put(@Nonnull String name, @Nonnull String value)
public boolean put(@Nonnull String name, @Nonnull Set<String> values)
public boolean put(@Nonnull String name, @Nonnull List<String> values)
public Http.Headers putAll(Map<String,String> source)
public Http.Headers putAll(com.google.common.collect.Multimap<String,String> source)
public Http.Headers putAll(Http.Headers source)
public boolean remove(String name, String value)
public boolean removeAll(String name)
public int size()