org.apache.wicket.extensions.ajax.markup.html.form.upload
Class UploadInfo

java.lang.Object
  extended by org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadInfo
All Implemented Interfaces:
java.io.Serializable, IClusterable

public class UploadInfo
extends java.lang.Object
implements IClusterable

Holds information about an upload, also has useful querying methods.

Author:
Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Constructor Summary
UploadInfo(int totalBytes)
           
 
Method Summary
 long getBytesUploaded()
           
 java.lang.String getBytesUploadedString()
           
 long getElapsedMilliseconds()
           
 long getElapsedSeconds()
           
 int getPercentageComplete()
           
 long getRemainingMilliseconds()
           
 java.lang.String getRemainingTimeString()
           
 long getTotalBytes()
           
 java.lang.String getTotalBytesString()
           
 long getTransferRateBPS()
           
 java.lang.String getTransferRateString()
           
 void setBytesUploaded(long bytesUploaded)
          Sets bytes uploaded so far
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadInfo

public UploadInfo(int totalBytes)
Parameters:
totalBytes -
Method Detail

getBytesUploaded

public long getBytesUploaded()
Returns:
bytes uploaded so far

setBytesUploaded

public void setBytesUploaded(long bytesUploaded)
Sets bytes uploaded so far

Parameters:
bytesUploaded -

getBytesUploadedString

public java.lang.String getBytesUploadedString()
Returns:
human readable string of bytes uploaded so far

getTotalBytesString

public java.lang.String getTotalBytesString()
Returns:
human readable string of total number of bytes

getTotalBytes

public long getTotalBytes()
Returns:
total bytes in the upload

getElapsedMilliseconds

public long getElapsedMilliseconds()
Returns:
milliseconds elapsed since upload started

getElapsedSeconds

public long getElapsedSeconds()
Returns:
seconds elapsed since upload started

getTransferRateBPS

public long getTransferRateBPS()
Returns:
transfer rate in bits per second

getTransferRateString

public java.lang.String getTransferRateString()
Returns:
transfer rate in a human readable string

getPercentageComplete

public int getPercentageComplete()
Returns:
percent of the upload completed

getRemainingMilliseconds

public long getRemainingMilliseconds()
Returns:
estimate of the remaining number of milliseconds

getRemainingTimeString

public java.lang.String getRemainingTimeString()
Returns:
estimate of the remaining time in a human readable string


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.