docs/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.RequestProperties.html
Package com.google.android.exoplayer2.upstream
Enclosing interface:HttpDataSource
public static final classHttpDataSource.RequestPropertiesextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Stores HTTP request properties (aka HTTP headers) and provides methods to modify the headers in a thread safe way to avoid the potential of creating snapshots of an inconsistent or unintended state.
Constructors | Constructor | Description |
| --- | --- |
| RequestProperties() | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | clear() |
Clears all request properties.
|
| void | clearAndSet(Map<String,String> properties) |
Removes all properties previously existing and sets the keys and values of the map.
|
| Map<String,String> | getSnapshot() |
Gets a snapshot of the request properties.
|
| void | remove(String name) |
Removes a request property by name.
|
| void | set(String name, String value) |
Sets the specified property value for the specified name.
|
| void | set(Map<String,String> properties) |
Sets the keys and values contained in the map.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public RequestProperties()
-
public void set([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")value)
Sets the specified property value for the specified name. If a property for this name previously existed, the old value is replaced by the specified value.
Parameters:name - The name of the request property.value - The value of the request property.
-
public void set([Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> properties)
Sets the keys and values contained in the map. If a property previously existed, the old value is replaced by the specified value. If a property previously existed and is not in the map, the property is left unchanged.
Parameters:properties - The request properties.
-
public void clearAndSet([Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> properties)
Removes all properties previously existing and sets the keys and values of the map.
Parameters:properties - The request properties.
-
public void remove([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name)
Removes a request property by name.
Parameters:name - The name of the request property to remove.
-
public void clear()
Clears all request properties.
-
public[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> getSnapshot()
Gets a snapshot of the request properties. Returns:A snapshot of the request properties.