|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.net.NutiteqDownloadCounter
public class NutiteqDownloadCounter
Default download counter used in library. For every network request adds an estimate of 100 bytes of overhead for creating the connection.
| Constructor Summary | |
|---|---|
NutiteqDownloadCounter()
|
|
| Method Summary | |
|---|---|
void |
cacheHit(java.lang.String url,
int length)
Data for given url was retrieved from cache |
void |
downloadCompleted()
Download request was completed. |
void |
downloaded(int dataLength)
Notify about donwloaded bytes |
int |
getBytesLoadedFromCache()
|
int |
getDownloadedBytes()
|
int |
getNumberOfCacheHits()
|
int |
getNumberOfNetworkRequests()
|
void |
networkRequest(java.lang.String url)
Successful network request has been made. |
void |
setNetworkListener(NetworkListener networkListener)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NutiteqDownloadCounter()
| Method Detail |
|---|
public void networkRequest(java.lang.String url)
DownloadCounter
networkRequest in interface DownloadCounterurl - request url
public void cacheHit(java.lang.String url,
int length)
DownloadCounter
cacheHit in interface DownloadCounterurl - request urllength - loaded data sizepublic void downloaded(int dataLength)
DownloadCounter
downloaded in interface DownloadCounterdataLength - number of bytes downloadedpublic int getDownloadedBytes()
getDownloadedBytes in interface DownloadCounterpublic void setNetworkListener(NetworkListener networkListener)
setNetworkListener in interface DownloadCounterpublic void downloadCompleted()
DownloadCounter
downloadCompleted in interface DownloadCounterpublic int getNumberOfNetworkRequests()
getNumberOfNetworkRequests in interface DownloadCounterpublic int getNumberOfCacheHits()
getNumberOfCacheHits in interface DownloadCounterpublic int getBytesLoadedFromCache()
getBytesLoadedFromCache in interface DownloadCounter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||