uk.org.retep.util.monitor
Class BandwidthProgressListener

java.lang.Object
  extended by uk.org.retep.util.monitor.ProgressListenerAdaptor
      extended by uk.org.retep.util.monitor.BandwidthProgressListener
All Implemented Interfaces:
ProgressListener

public class BandwidthProgressListener
extends ProgressListenerAdaptor

A ProgressListener implementation that

Author:
peter

Nested Class Summary
static class BandwidthProgressListener.MonitoredInputStream
           
static class BandwidthProgressListener.MonitoredOutputStream
           
 
Field Summary
static java.lang.String COLUMN_NAMES
          String containing the column names
static java.lang.String FORMAT
          Format used to populate the columns
static java.lang.String SEPARATOR
          Separator line to place below COLUMN_NAMES
 
Constructor Summary
BandwidthProgressListener()
           
 
Method Summary
 long getDuration()
           
 long getDurationSeconds()
           
 long getInputKBs()
           
 long getInputSize()
           
static long getKBs(long size, long millis)
           
 long getLatest()
           
 long getOutputKBs()
           
 long getOutputSize()
           
 long getStart()
           
 void reset()
           
 void showProgress(long inputSize, long outputSize)
          Notify listners of the current progress.
 java.lang.String toString()
           
static java.lang.String toString(long duration, long size)
           
 
Methods inherited from class uk.org.retep.util.monitor.ProgressListenerAdaptor
setMaximum, setMaximum, showProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COLUMN_NAMES

public static final java.lang.String COLUMN_NAMES
String containing the column names

See Also:
Constant Field Values

SEPARATOR

public static final java.lang.String SEPARATOR
Separator line to place below COLUMN_NAMES

See Also:
Constant Field Values

FORMAT

public static final java.lang.String FORMAT
Format used to populate the columns

See Also:
Constant Field Values
Constructor Detail

BandwidthProgressListener

public BandwidthProgressListener()
Method Detail

showProgress

public void showProgress(long inputSize,
                         long outputSize)
Description copied from interface: ProgressListener
Notify listners of the current progress. This method is normall used by compression routines so the listener knows how much the input has been compressed by

Specified by:
showProgress in interface ProgressListener
Overrides:
showProgress in class ProgressListenerAdaptor
Parameters:
inputSize - The current size of the input, possibly the amount read so far
outputSize - The current size of the output, probably the total size of the compressed output

reset

public void reset()

getLatest

public long getLatest()

getInputSize

public long getInputSize()

getOutputSize

public long getOutputSize()

getStart

public long getStart()

getDuration

public long getDuration()

getDurationSeconds

public long getDurationSeconds()

getKBs

public static long getKBs(long size,
                          long millis)

getInputKBs

public long getInputKBs()

getOutputKBs

public long getOutputKBs()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public static java.lang.String toString(long duration,
                                        long size)


Copyright © 1998-2010 Retep Development Group. All Rights Reserved.