Class FormData.FormField
- java.lang.Object
-
- org.springframework.extensions.webscripts.servlet.FormData.FormField
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- FormData
public class FormData.FormField extends java.lang.Object implements java.io.SerializableForm Field- Author:
- davidc
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormField(org.apache.commons.fileupload.FileItem file)Construct
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Cleanup any temporary resources associated with this form field NOTE: This should only be invoked after processing (e.g.org.springframework.extensions.surf.util.ContentgetContent()java.lang.StringgetFilename()java.io.InputStreamgetInputStream()booleangetIsFile()java.lang.StringgetMimetype()java.lang.StringgetName()java.lang.StringgetValue()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- field name
-
getIsFile
public boolean getIsFile()
- Returns:
- true => field represents a file
-
getValue
public java.lang.String 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
public java.io.InputStream getInputStream()
- Returns:
- InputStream to contents of file
-
getMimetype
public java.lang.String getMimetype()
- Returns:
- mimetype
-
getFilename
public java.lang.String 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
-
-