OoyalaDrmHttpDataSource is a component from which streams of data can be read.
More...
|
| OoyalaDrmHttpDataSource (String userAgent, Predicate< String > contentTypePredicate) |
|
| OoyalaDrmHttpDataSource (String userAgent, Predicate< String > contentTypePredicate, TransferListener listener) |
|
| OoyalaDrmHttpDataSource (String userAgent, Predicate< String > contentTypePredicate, TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) |
|
| OoyalaDrmHttpDataSource (String userAgent, Predicate< String > contentTypePredicate, TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis, boolean allowCrossProtocolRedirects, RequestProperties defaultRequestProperties) |
|
Uri | getUri () |
|
Map< String, List< String > > | getResponseHeaders () |
|
void | setRequestProperty (String name, String value) |
|
void | clearRequestProperty (String name) |
|
void | clearAllRequestProperties () |
|
void | addTransferListener (TransferListener transferListener) |
|
long | open (DataSpec dataSpec) throws HttpDataSourceException |
|
int | read (byte[] buffer, int offset, int readLength) throws HttpDataSourceException |
|
void | close () throws HttpDataSourceException |
|
OoyalaDrmHttpDataSource is a component from which streams of data can be read.
The class is created to obtain and parse a response body and throw a special OoyalaInvalidResponseCodeException if needed.
com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.OoyalaDrmHttpDataSource |
( |
String |
userAgent, |
|
|
Predicate< String > |
contentTypePredicate |
|
) |
| |
com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.OoyalaDrmHttpDataSource |
( |
String |
userAgent, |
|
|
Predicate< String > |
contentTypePredicate, |
|
|
TransferListener |
listener |
|
) |
| |
com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.OoyalaDrmHttpDataSource |
( |
String |
userAgent, |
|
|
Predicate< String > |
contentTypePredicate, |
|
|
TransferListener |
listener, |
|
|
int |
connectTimeoutMillis, |
|
|
int |
readTimeoutMillis |
|
) |
| |
- Parameters
-
userAgent | The User-Agent string that should be used. |
contentTypePredicate | An optional Predicate. If a content type is rejected by the predicate then a HttpDataSource.InvalidContentTypeException is thrown from open(DataSpec). |
listener | An optional listener. For more info check TransferListener. |
connectTimeoutMillis | The connection timeout, in milliseconds. A timeout of zero is interpreted as an infinite timeout. |
readTimeoutMillis | The read timeout, in milliseconds. A timeout of zero is interpreted as an infinite timeout. |
com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.OoyalaDrmHttpDataSource |
( |
String |
userAgent, |
|
|
Predicate< String > |
contentTypePredicate, |
|
|
TransferListener |
listener, |
|
|
int |
connectTimeoutMillis, |
|
|
int |
readTimeoutMillis, |
|
|
boolean |
allowCrossProtocolRedirects, |
|
|
RequestProperties |
defaultRequestProperties |
|
) |
| |
- Parameters
-
userAgent | The User-Agent string that should be used. |
contentTypePredicate | An optional Predicate. If a content type is rejected by the predicate then a HttpDataSource.InvalidContentTypeException is thrown from open(DataSpec). |
listener | An optional listener. For more info check TransferListener. |
connectTimeoutMillis | The connection timeout, in milliseconds. A timeout of zero is interpreted as an infinite timeout. Pass DEFAULT_CONNECT_TIMEOUT_MILLIS to use the default value. |
readTimeoutMillis | The read timeout, in milliseconds. A timeout of zero is interpreted as an infinite timeout. Pass DEFAULT_READ_TIMEOUT_MILLIS to use the default value. |
allowCrossProtocolRedirects | Whether cross-protocol redirects (i.e. redirects from HTTP to HTTPS and vice versa) are enabled. |
defaultRequestProperties | The default request properties to be sent to the server as HTTP headers or if not required. |
void com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.addTransferListener |
( |
TransferListener |
transferListener | ) |
|
final long com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.bytesRead |
( |
| ) |
|
|
protected |
Returns the number of bytes that have been read since the most recent call to open(DataSpec).
- Returns
- The number of bytes read.
final long com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.bytesRemaining |
( |
| ) |
|
|
protected |
Returns the number of bytes that are still to be read for the current DataSpec.
If the total length of the data being read is known, then this length minus
is returned. If the total length is unknown, C#LENGTH_UNSET is returned.
- Returns
- The remaining length, or C#LENGTH_UNSET.
final long com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.bytesSkipped |
( |
| ) |
|
|
protected |
Returns the number of bytes that have been skipped since the most recent call to open(DataSpec).
- Returns
- The number of bytes skipped.
void com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.clearAllRequestProperties |
( |
| ) |
|
void com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.clearRequestProperty |
( |
String |
name | ) |
|
final HttpURLConnection com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.getConnection |
( |
| ) |
|
|
protected |
Returns the current connection, or null if the source is not currently opened.
- Returns
- The current open connection, or null.
Map<String, List<String> > com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.getResponseHeaders |
( |
| ) |
|
Uri com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.getUri |
( |
| ) |
|
long com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.open |
( |
DataSpec |
dataSpec | ) |
throws HttpDataSourceException |
int com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.read |
( |
byte [] |
buffer, |
|
|
int |
offset, |
|
|
int |
readLength |
|
) |
| throws HttpDataSourceException |
void com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.setRequestProperty |
( |
String |
name, |
|
|
String |
value |
|
) |
| |
final int com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS = 8 * 1000 |
|
static |
The default connection timeout, in milliseconds.
final int com.ooyala.android.player.exoplayer.upstream.OoyalaDrmHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS = 8 * 1000 |
|
static |
The default read timeout, in milliseconds.