public class FileUploadEvent
extends java.util.EventObject
FileUploadListener
when the file upload processing requires some
kind of action to be taken by the listener.Modifier and Type | Field and Description |
---|---|
static int |
ERROR_EXCEPTION
The error code for I/O exception occurred.
|
static int |
ERROR_FILESIZE
The error code for file size exceeded.
|
static int |
ERROR_NONE
The error code for no error.
|
static int |
ERROR_NOTFOUND
The error code for file not found.
|
private int |
ivError
The upload processing's error code.
|
private java.lang.String |
ivField
The name of the form field being processed.
|
private java.lang.String |
ivFile
The name of the file being processed.
|
private java.util.HashMap<java.lang.String,java.lang.String> |
ivParams
The submitted form fields and their values.
|
private static long |
serialVersionUID
The class' serialization version id.
|
Constructor and Description |
---|
FileUploadEvent(FileUpload source,
java.lang.String field,
java.lang.String file,
java.util.HashMap<java.lang.String,java.lang.String> params,
int error)
Constructor for the upload event.
|
Modifier and Type | Method and Description |
---|---|
BaseServletContext |
getContext()
Returns the current context for the servlet or thread that initiated the
file upload.
|
int |
getError()
Returns the upload processing's error code.
|
java.lang.String |
getField()
Returns the name of the form field being processed.
|
java.lang.String |
getFile()
Returns the name of the file being processed.
|
java.lang.String |
getParam(java.lang.String name)
Returns a parameter value from the submitted form fields and values.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getParams()
Returns the hash map of all submitted form fields and values.
|
java.lang.String |
getParamString(java.lang.String name)
Returns a parameter value from the submitted form fields and values.
|
private static final long serialVersionUID
public static final int ERROR_NONE
public static final int ERROR_NOTFOUND
public static final int ERROR_FILESIZE
public static final int ERROR_EXCEPTION
private java.lang.String ivField
private java.lang.String ivFile
private java.util.HashMap<java.lang.String,java.lang.String> ivParams
private int ivError
public FileUploadEvent(FileUpload source, java.lang.String field, java.lang.String file, java.util.HashMap<java.lang.String,java.lang.String> params, int error)
source
- (FileUpload) The object where the event originated.field
- (String) The name of the form field being processed.file
- (String) The name of the file being processed.params
- (HashMap) The submitted form fields and their values.error
- (int) The upload processing's error code.public BaseServletContext getContext()
public java.lang.String getField()
public java.lang.String getFile()
public java.lang.String getParam(java.lang.String name)
name
- (String) The name of the desired parameter value.null
if a value for the parameter name does
not exist.public java.util.HashMap<java.lang.String,java.lang.String> getParams()
public java.lang.String getParamString(java.lang.String name)
name
- (String) The name of the desired parameter value.public int getError()