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:
  • Constructor Details

    • FormField

      public FormField(org.apache.commons.fileupload2.core.FileItem file)
      Construct
      Parameters:
      file - FileItem
  • Method Details

    • 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 org.springframework.extensions.surf.util.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)
    • 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