|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.axet.wget.SpeedInfo
public class SpeedInfo
| Nested Class Summary | |
|---|---|
class |
SpeedInfo.Sample
|
| Field Summary | |
|---|---|
protected long |
peak
|
static int |
SAMPLE_LENGTH
|
static int |
SAMPLE_MAX
|
protected ArrayList<SpeedInfo.Sample> |
samples
|
protected SpeedInfo.Sample |
start
|
| Constructor Summary | |
|---|---|
SpeedInfo()
|
|
| Method Summary | |
|---|---|
protected void |
add(SpeedInfo.Sample s)
|
int |
getAverageSpeed()
Average speed from start download |
int |
getAverageSpeed(int stepsBack)
Average speed for maximum stepsBack steps |
int |
getCurrentSpeed()
Current download speed |
protected long |
getLastUpdate()
|
long |
getPeak()
|
protected int |
getRowSamples()
return number of samples in the row (before download restart) |
SpeedInfo.Sample |
getSample(int index)
|
int |
getSamples()
|
protected SpeedInfo.Sample |
getStart()
|
protected void |
peakUpdate()
|
void |
start(long current)
Start calculate speed from 'current' bytes downloaded |
void |
step(long current)
step download process with 'current' bytes downloaded |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SAMPLE_LENGTH
public static final int SAMPLE_MAX
protected ArrayList<SpeedInfo.Sample> samples
protected long peak
protected SpeedInfo.Sample start
| Constructor Detail |
|---|
public SpeedInfo()
| Method Detail |
|---|
public void start(long current)
current - public void step(long current)
current - public int getCurrentSpeed()
public int getAverageSpeed()
public int getAverageSpeed(int stepsBack)
stepsBack -
public int getSamples()
public SpeedInfo.Sample getSample(int index)
public long getPeak()
protected SpeedInfo.Sample getStart()
protected void add(SpeedInfo.Sample s)
protected int getRowSamples()
protected long getLastUpdate()
protected void peakUpdate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||