Class FormData.FormField
java.lang.Object
org.springframework.extensions.webscripts.servlet.FormData.FormField
- All Implemented Interfaces:
Serializable
- Enclosing class:
- FormData
Form Field
- Author:
- davidc
- See Also:
-
Constructor Details
-
FormField
public FormField(org.apache.commons.fileupload2.core.FileItem file) Construct- Parameters:
file- FileItem
-
-
Method Details
-
getName
- Returns:
- field name
-
getIsFile
public boolean getIsFile()- Returns:
- true => field represents a file
-
getValue
- Returns:
- field value (for form fields) for file upload fields, the file name is returned - use getContent() instead.
-
getContent
public org.springframework.extensions.surf.util.Content getContent()- Returns:
- field as content
-
getInputStream
- Returns:
- InputStream to contents of file
-
getMimetype
- Returns:
- mimetype
-
getFilename
- Returns:
- filename (only for file fields, otherwise null)
-
cleanup
public void cleanup()Cleanup any temporary resources associated with this form field NOTE: This should only be invoked after processing (e.g. retrieval of content) of the form field is done
-