-
- All Implemented Interfaces:
-
com.danikula.videocache.Source
public class HttpUrlSource implements Source
Source that uses http resource as source for ProxyCache.
-
-
Constructor Summary
Constructors Constructor Description HttpUrlSource(String url, HostnameVerifier v, Array<TrustManager> trustAllCerts)HttpUrlSource(String url, SourceInfoStorage sourceInfoStorage, HostnameVerifier v, Array<TrustManager> trustAllCerts)HttpUrlSource(String url, SourceInfoStorage sourceInfoStorage, HeaderInjector headerInjector, HostnameVerifier v, Array<TrustManager> trustAllCerts)HttpUrlSource(HttpUrlSource source)
-
Method Summary
Modifier and Type Method Description synchronized longlength()Returns length bytes or negative value if length is unknown. voidopen(long offset)Opens source. voidclose()Closes source and release resources. intread(Array<byte> buffer)Read data to byte buffer from source with current offset. synchronized StringgetMime()StringgetUrl()StringtoString()-
-
Constructor Detail
-
HttpUrlSource
HttpUrlSource(String url, HostnameVerifier v, Array<TrustManager> trustAllCerts)
-
HttpUrlSource
HttpUrlSource(String url, SourceInfoStorage sourceInfoStorage, HostnameVerifier v, Array<TrustManager> trustAllCerts)
-
HttpUrlSource
HttpUrlSource(String url, SourceInfoStorage sourceInfoStorage, HeaderInjector headerInjector, HostnameVerifier v, Array<TrustManager> trustAllCerts)
-
HttpUrlSource
HttpUrlSource(HttpUrlSource source)
-
-
Method Detail
-
length
synchronized long length()
Returns length bytes or negative value if length is unknown.
-
open
void open(long offset)
Opens source. Source should be open before using read
- Parameters:
offset- offset in bytes for source.
-
close
void close()
Closes source and release resources. Every opened source should be closed.
-
read
int read(Array<byte> buffer)
Read data to byte buffer from source with current offset.
- Parameters:
buffer- a buffer to be used for reading data.
-
-
-
-