|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.servlet.UploadFileRequest
public class UploadFileRequest
Handles a request stream that contains files to be uploaded.
Note that if a request contains files to be upload, the getParameter(java.lang.String), getParameterNames() and getParameterValues(java.lang.String)
methods of this class should be used, rather than the equivalent methods of
the ServletRequest object.
| Constructor Summary | |
|---|---|
UploadFileRequest(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
int maxSize)
Constructs a new UploadFileRequest to save any uploaded files to the specified directory. |
|
| Method Summary | |
|---|---|
java.lang.String |
getParameter(java.lang.String name)
Returns the value of a request parameter as a String, or
null if the parameter does not exist. |
java.util.Enumeration<java.lang.String> |
getParameterNames()
Returns an Enumeration of String objects
containing the names of the parameters contained in this request. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns an array of String objects containing all of the
values the given request parameter has, or null if the
parameter does not exist. |
UploadedFile |
getUploadedFile(java.lang.String sourceFileName)
Returns the specified uploaded file instance. |
java.util.Enumeration<java.lang.String> |
getUploadedFileNames()
Returns an Enumeration of String objects
containing the names of the files uploaded in this request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UploadFileRequest(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
int maxSize)
throws UploadFileRequestException
context - the servlet context.request - the servlet request instance.maxSize - the maximum file posting size (in bytes).
UploadFileRequestException - if the Content-Length of the request exceeds the maximum
posting size, or the Content-Type header does not contain the
boundary, or the save directory is not a directory or is not
writable.| Method Detail |
|---|
public java.lang.String getParameter(java.lang.String name)
String, or
null if the parameter does not exist. Request parameters
are extra information sent with the request.
You should only use this method when you are sure the parameter has only
one value. If the parameter might have more than one value, use getParameterValues(java.lang.String).
If you use this method with a multivalued parameter, the servlet engine determines the return value.
name - a String specifying the name of the parameter
String representing the single value of the
parametergetParameterValues(java.lang.String)public java.util.Enumeration<java.lang.String> getParameterNames()
Enumeration of String objects
containing the names of the parameters contained in this request. If the
request has no parameters or if the input stream is empty, returns an
empty Enumeration. The input stream is empty when all the
data returned by #getInputStream has been read.
Enumeration of String objects,
each String containing the name of a request
parameter; or an empty Enumeration if the request
has no parameterspublic java.lang.String[] getParameterValues(java.lang.String name)
String objects containing all of the
values the given request parameter has, or null if the
parameter does not exist. For example, in an HTTP servlet, this method
returns an array of String objects containing the values
of a query string or posted form.
If the parameter has a single value, the array has a length of 1.
name - a String containing the name of the parameter
whose value is requested
String objects containing the
parameter's valuesgetParameter(java.lang.String)public UploadedFile getUploadedFile(java.lang.String sourceFileName)
sourceFileName - the file name of the uploaded file to be retrieved.
getUploadedFileNames()public java.util.Enumeration<java.lang.String> getUploadedFileNames()
Enumeration of String objects
containing the names of the files uploaded in this request. If the
request has no uploaded files, returns an empty Enumeration.
Enumeration of String objects,
each String containing the source file name of an
uploaded file; or an empty Enumeration if the
request has no uploaded files.getUploadedFile(java.lang.String)
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||