Java 类com.google.android.exoplayer.util.Predicate 实例源码

项目:danish-media-license    文件:OkHttpDataSource.java   
/**
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a {@link HttpDataSource.InvalidContentTypeException}
 *                             is thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 * @param cacheControl         An optional {@link CacheControl} which sets all requests'
 *                             Cache-Control header. For example, you could force the network
 *                             response for all requests.
 */
private OkHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
                         TransferListener listener, CacheControl cacheControl) {
  DmlApplication.getInstance().getBackendComponent().inject(this);
  Assertions.checkNotNull(callFactory);
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.cacheControl = cacheControl;
  this.requestProperties = new HashMap<>();
}
项目:ExoCacheDataSource    文件:OkHttpDataSource.java   
/**
 * @param client               An {@link OkHttpClient} for use by the source.
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a
 *                             {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *                             thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 * @param cacheControl         An optional {@link CacheControl} which sets all requests' Cache-Control
 *                             header. For example, you could force the network response for all requests.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener,
                        CacheControl cacheControl) {
    this.okHttpClient = Assertions.checkNotNull(client);
    this.userAgent = Assertions.checkNotEmpty(userAgent);
    this.contentTypePredicate = contentTypePredicate;
    this.listener = listener;
    this.cacheControl = cacheControl;
    this.requestProperties = new HashMap<>();
}
项目:miku    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout. Pass {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS} to use
 *     the default value.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout. Pass {@link #DEFAULT_READ_TIMEOUT_MILLIS} to use the default value.
 * @param allowCrossProtocolRedirects Whether cross-protocol redirects (i.e. redirects from HTTP
 *     to HTTPS and vice versa) are enabled.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis,
    boolean allowCrossProtocolRedirects) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
  this.allowCrossProtocolRedirects = allowCrossProtocolRedirects;
}
项目:ExoPlayer-Demo    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
 *     header. For example, you could force the network response for all requests.
 *
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
    Predicate<String> contentTypePredicate, TransferListener listener,
    CacheControl cacheControl) {
  this.okHttpClient = Assertions.checkNotNull(client);
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.cacheControl = cacheControl;
  this.requestProperties = new HashMap<>();
}
项目:ExoPlayer-Demo    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout. Pass {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS} to use
 *     the default value.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout. Pass {@link #DEFAULT_READ_TIMEOUT_MILLIS} to use the default value.
 * @param allowCrossProtocolRedirects Whether cross-protocol redirects (i.e. redirects from HTTP
 *     to HTTPS and vice versa) are enabled.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis,
    boolean allowCrossProtocolRedirects) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
  this.allowCrossProtocolRedirects = allowCrossProtocolRedirects;
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
 *     header. For example, you could force the network response for all requests.
 *
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener,
                        CacheControl cacheControl) {
    this.okHttpClient = Assertions.checkNotNull(client);
    this.userAgent = Assertions.checkNotEmpty(userAgent);
    this.contentTypePredicate = contentTypePredicate;
    this.listener = listener;
    this.cacheControl = cacheControl;
    this.requestProperties = new HashMap<>();
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
 *     header. For example, you could force the network response for all requests.
 *
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener,
                        CacheControl cacheControl) {
    this.okHttpClient = Assertions.checkNotNull(client);
    this.userAgent = Assertions.checkNotEmpty(userAgent);
    this.contentTypePredicate = contentTypePredicate;
    this.listener = listener;
    this.cacheControl = cacheControl;
    this.requestProperties = new HashMap<>();
}
项目:android-exoplayer    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<String, String>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
}
项目:Exoplayer_VLC    文件:RawHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link com.google.android.exoplayer.util.Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(com.google.android.exoplayer.upstream.DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public RawHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
                         TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<String, String>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
}
项目:Exoplayer_VLC    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<String, String>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
}
项目:edx-app-android    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<String, String>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
}
项目:ExoPlayer    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout. Pass {@link #DEFAULT_CONNECT_TIMEOUT_MILLIS} to use
 *     the default value.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout. Pass {@link #DEFAULT_READ_TIMEOUT_MILLIS} to use the default value.
 * @param allowCrossProtocolRedirects Whether cross-protocol redirects (i.e. redirects from HTTP
 *     to HTTPS and vice versa) are enabled.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis,
    boolean allowCrossProtocolRedirects) {
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.requestProperties = new HashMap<>();
  this.connectTimeoutMillis = connectTimeoutMillis;
  this.readTimeoutMillis = readTimeoutMillis;
  this.allowCrossProtocolRedirects = allowCrossProtocolRedirects;
}
项目:ExoCacheDataSource    文件:OkHttpDataSource.java   
/**
 * @param client               An {@link OkHttpClient} for use by the source.
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a
 *                             {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *                             thrown from {@link #open(DataSpec)}.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate) {
    this(client, userAgent, contentTypePredicate, null);
}
项目:ExoCacheDataSource    文件:OkHttpDataSource.java   
/**
 * @param client               An {@link OkHttpClient} for use by the source.
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a
 *                             {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *                             thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
    this(client, userAgent, contentTypePredicate, listener, null);
}
项目:miku    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:miku    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:miku    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this(userAgent, contentTypePredicate, listener, connectTimeoutMillis, readTimeoutMillis, false);
}
项目:ExoPlayer-Demo    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
    Predicate<String> contentTypePredicate) {
  this(client, userAgent, contentTypePredicate, null);
}
项目:ExoPlayer-Demo    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
    Predicate<String> contentTypePredicate, TransferListener listener) {
  this(client, userAgent, contentTypePredicate, listener, null);
}
项目:ExoPlayer-Demo    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:ExoPlayer-Demo    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:ExoPlayer-Demo    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this(userAgent, contentTypePredicate, listener, connectTimeoutMillis, readTimeoutMillis, false);
}
项目:danish-media-license    文件:OkHttpDataSource.java   
/**
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a {@link HttpDataSource.InvalidContentTypeException}
 *                             is thrown from {@link #open(DataSpec)}.
 */
public OkHttpDataSource(String userAgent,
                        Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:danish-media-license    文件:OkHttpDataSource.java   
/**
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a {@link HttpDataSource.InvalidContentTypeException}
 *                             is thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 */
public OkHttpDataSource(String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, null);
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate) {
    this(client, userAgent, contentTypePredicate, null);
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
    this(client, userAgent, contentTypePredicate, listener, null);
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate) {
    this(client, userAgent, contentTypePredicate, null);
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
    this(client, userAgent, contentTypePredicate, listener, null);
}
项目:android-exoplayer    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:android-exoplayer    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:Exoplayer_VLC    文件:RawHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link com.google.android.exoplayer.util.Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(com.google.android.exoplayer.upstream.DataSpec)}.
 */
public RawHttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:Exoplayer_VLC    文件:RawHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link com.google.android.exoplayer.util.Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(com.google.android.exoplayer.upstream.DataSpec)}.
 * @param listener An optional listener.
 */
public RawHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
                         TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:Exoplayer_VLC    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:Exoplayer_VLC    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:edx-app-android    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:edx-app-android    文件:HttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link InvalidContentTypeException} is thrown from
 *     {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public HttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:ExoPlayer    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate) {
  this(userAgent, contentTypePredicate, null);
}
项目:ExoPlayer    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, DEFAULT_CONNECT_TIMEOUT_MILLIS,
      DEFAULT_READ_TIMEOUT_MILLIS);
}
项目:ExoPlayer    文件:DefaultHttpDataSource.java   
/**
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is
 *     rejected by the predicate then a {@link HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param connectTimeoutMillis The connection timeout, in milliseconds. A timeout of zero is
 *     interpreted as an infinite timeout.
 * @param readTimeoutMillis The read timeout, in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public DefaultHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
    TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis) {
  this(userAgent, contentTypePredicate, listener, connectTimeoutMillis, readTimeoutMillis, false);
}