Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.action.multipart
Class UploadInfo

java.lang.Object
  extended by com.jivesoftware.base.action.multipart.UploadInfo
All Implemented Interfaces:
java.io.Serializable

public class UploadInfo
extends java.lang.Object
implements java.io.Serializable

This class is a container object that holds information pertaining to an upload that is in progress.

See Also:
Serialized Form

Constructor Summary
UploadInfo()
           
UploadInfo(int fileIndex, long totalSize, long bytesRead, long elapsedTime, java.lang.String status)
          Constructor with parameters for all available variables.
 
Method Summary
 long getBytesRead()
          Returns the number of bytes that have been read.
 long getElapsedTime()
          Returns the elapsed time since the start of the upload.
 int getFileIndex()
          Returns the index of the file currently being uploaded.
 java.lang.String getStatus()
          Returns the status of the upload.
 long getTotalSize()
          Returns the total size of the upload.
 boolean isInProgress()
          Returns true if the upload is in progress, false otherwise.
 void setBytesRead(long bytesRead)
          Sets the number of bytes that have been read.
 void setElapsedTime(long elapsedTime)
          Sets the elapsed time since the start of the upload.
 void setFileIndex(int fileIndex)
          Sets the index of the file currently being uploaded.
 void setStatus(java.lang.String status)
          Sets the status of the upload.
 void setTotalSize(long totalSize)
          Sets the total size of the upload.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadInfo

public UploadInfo()

UploadInfo

public UploadInfo(int fileIndex,
                  long totalSize,
                  long bytesRead,
                  long elapsedTime,
                  java.lang.String status)
Constructor with parameters for all available variables.

Parameters:
fileIndex - the index of the current file being uploaded
totalSize - the total size of the upload
bytesRead - the number of bytes that have been read
elapsedTime - the elapsed time since the start of the upload
status - the status of the upload
Method Detail

getStatus

public java.lang.String getStatus()
Returns the status of the upload.

Returns:
the status of the upload - one of start, progress, error or done

setStatus

public void setStatus(java.lang.String status)
Sets the status of the upload.

Parameters:
status - the status of the upload - one of start, progress, error or done

getTotalSize

public long getTotalSize()
Returns the total size of the upload.

Returns:
the total size of the upload.

setTotalSize

public void setTotalSize(long totalSize)
Sets the total size of the upload.

Parameters:
totalSize - the total size of the upload.

getBytesRead

public long getBytesRead()
Returns the number of bytes that have been read.

Returns:
the number of bytes that have been read.

setBytesRead

public void setBytesRead(long bytesRead)
Sets the number of bytes that have been read.

Parameters:
bytesRead - the number of bytes that have been read.

getElapsedTime

public long getElapsedTime()
Returns the elapsed time since the start of the upload.

Returns:
the elapsed time since the start of the upload

setElapsedTime

public void setElapsedTime(long elapsedTime)
Sets the elapsed time since the start of the upload.

Parameters:
elapsedTime - the elapsed time since the start of the upload

isInProgress

public boolean isInProgress()
Returns true if the upload is in progress, false otherwise.

Returns:
true if the upload is in progress, false otherwise

getFileIndex

public int getFileIndex()
Returns the index of the file currently being uploaded.

Returns:
the index of the file currently being uploaded

setFileIndex

public void setFileIndex(int fileIndex)
Sets the index of the file currently being uploaded.

Parameters:
fileIndex - the index of the file currently being uploaded.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.