| Constructor and Description |
|---|
HttpUrlSource(HttpUrlSource source) |
HttpUrlSource(java.lang.String url) |
HttpUrlSource(java.lang.String url,
SourceInfoStorage sourceInfoStorage) |
HttpUrlSource(java.lang.String url,
SourceInfoStorage sourceInfoStorage,
HeaderInjector headerInjector) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes source and release resources.
|
java.lang.String |
getMime() |
java.lang.String |
getUrl() |
long |
length()
Returns length bytes or negative value if length is unknown.
|
void |
open(long offset)
Opens source.
|
int |
read(byte[] buffer)
Read data to byte buffer from source with current offset.
|
java.lang.String |
toString() |
public HttpUrlSource(java.lang.String url)
public HttpUrlSource(java.lang.String url,
SourceInfoStorage sourceInfoStorage)
public HttpUrlSource(java.lang.String url,
SourceInfoStorage sourceInfoStorage,
HeaderInjector headerInjector)
public HttpUrlSource(HttpUrlSource source)
public long length()
throws ProxyCacheException
Sourcelength in interface SourceProxyCacheException - if error occur while fetching source data.public void open(long offset)
throws ProxyCacheException
SourceSource.read(byte[])open in interface Sourceoffset - offset in bytes for source.ProxyCacheException - if error occur while opening source.public void close()
throws ProxyCacheException
Sourceclose in interface SourceProxyCacheException - if error occur while closing source.public int read(byte[] buffer)
throws ProxyCacheException
Sourceread in interface Sourcebuffer - a buffer to be used for reading data.ProxyCacheException - if error occur while reading source.public java.lang.String getMime()
throws ProxyCacheException
ProxyCacheExceptionpublic java.lang.String getUrl()
public java.lang.String toString()
toString in class java.lang.Object