|
Java Tool Kit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectITT.WAFr.Utilities.Upload
The Upload class represents a "multipart/form-data" encoded post data block.
This class contains simple methods to retrieve posted files and other posted form element properties otherwise not accessible when encoded with "multipart/form-data".
| Nested Class Summary | |
class |
Upload.FormEncodingTypeException
This exception is thrown when the HttpServletRequest object's encoding type is not of type 'MultiPart/Form-Data'. |
class |
Upload.FormMethodException
This exception is thrown when the HttpServletRequest object's HTTP method is not of type 'POST'. |
class |
Upload.PostedFile
The PostedFile class represents the content and properties of a posted "multipart/form-data" encoded file. |
| Constructor Summary | |
Upload(HttpServletRequest request)
Constructs a new Upload object that retrieves all "multipart/form-data" encoded post data from a HttpServletRequest object. |
|
| Method Summary | |
String |
ElementValue(String sName)
Retrieves a the String value of a specified posted form element that does not contain a posted file. |
Upload.PostedFile |
File(String sName)
Retrieves a PostedFile object contained within the specified posted form element. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Upload(HttpServletRequest request)
throws Upload.FormMethodException,
Upload.FormEncodingTypeException,
IOException
Upload object that retrieves all "multipart/form-data" encoded post data from a HttpServletRequest object.
request - the HttpServletRequest object containing the "multipart/form-data" encoded post data.
IOException - if the HttpServletRequest object cannot be read.
Upload.FormEncodingTypeException - if the posted form is not of encode type "multipart/form-data".
Upload.FormMethodException - if the HttpServletRequest object does not have a method of "POST".| Method Detail |
public String ElementValue(String sName)
Posted data is usually retrievable via the HttpServletRequest.getParameter() method. When utilizing "multipart/form-data" encoded form data, this method of element retrieval is not available.
Therefore, to retrieve the values of input, select, textarea, or other form element values posted with a "multipart/form-data" encoded form, use this method.
sName - a String containing the value of the name attribute of the posted form element.
String containing the value of the specified form element.public Upload.PostedFile File(String sName)
sName - a String containing the value of the name attribute of the posted form element.
Upload.PostedFile
|
Java Tool Kit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||