org.springframework.extensions.webscripts.servlet
Class FormData.FormField
java.lang.Object
org.springframework.extensions.webscripts.servlet.FormData.FormField
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- FormData
public class FormData.FormField
- extends Object
- implements Serializable
Form Field
- Author:
- davidc
- See Also:
- Serialized Form
Constructor Summary |
FormData.FormField(org.apache.commons.fileupload.FileItem file)
Construct |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormData.FormField
public FormData.FormField(org.apache.commons.fileupload.FileItem file)
- Construct
- Parameters:
file
-
getName
public String getName()
- Returns:
- field name
getIsFile
public boolean getIsFile()
- Returns:
- true => field represents a file
getValue
public String getValue()
- Returns:
- field value (for form fields)
for file upload fields, the file name is returned - use getContent() instead.
getContent
public Content getContent()
- Returns:
- field as content
getInputStream
public InputStream getInputStream()
- Returns:
- InputStream to contents of file
getMimetype
public String getMimetype()
- Returns:
- mimetype
getFilename
public String getFilename()
- Returns:
- filename (only for file fields, otherwise null)
Copyright © 2009 SpringSource, Inc. All Rights Reserved.