|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.service.request.UploadProgress
public class UploadProgress
represents the progress of a file upload.
Command, UploadProgressCheck.getProgress(ServiceRequest), Serialized Form| Constructor Summary | |
|---|---|
UploadProgress()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getErrorMessage()
returns the error message or null, if no error occurred. |
int |
getProgress()
returns the progress in percent or -1, if the total content-length is unknown. |
boolean |
isErroneous()
returns whether the upload was erroneous, i.e. it failed. |
boolean |
isStale()
returns whether the information in this UploadProgress can
be considered stale, i.e. it is ready to be removed. |
protected void |
setError(java.lang.Exception e,
java.util.Locale locale)
marks the upload as erroneous, giving the cause and current request locale. |
protected void |
setFinished()
marks the progress to be finished. |
void |
update(long pBytesRead,
long pContentLength,
int pItems)
updates the progess. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UploadProgress()
| Method Detail |
|---|
public final void update(long pBytesRead,
long pContentLength,
int pItems)
update in interface org.apache.commons.fileupload.ProgressListenerpBytesRead - the total number of bytes, which have been read so far.pContentLength - the total number of bytes, which are being read. May be -1, if
this number is unknown.pItems - the number of the field, which is currently being read. (0 =
no item so far, 1 = first item is being read, ...)ProgressListener.update(long, long,
int)public final boolean isStale()
UploadProgress can
be considered stale, i.e. it is ready to be removed.
true, if the UploadProgress can be
considered stalepublic final int getProgress()
protected final void setFinished()
protected final void setError(java.lang.Exception e,
java.util.Locale locale)
e - the causelocale - the current localepublic final java.lang.String getErrorMessage()
null, if no error occurred.
public final boolean isErroneous()
true, if and only if the upload failed. Otherwise
false.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||