Class FormData.FormField

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    FormData

    public class FormData.FormField
    extends java.lang.Object
    implements java.io.Serializable
    Form 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
      void cleanup()
      Cleanup any temporary resources associated with this form field NOTE: This should only be invoked after processing (e.g.
      org.springframework.extensions.surf.util.Content getContent()  
      java.lang.String getFilename()  
      java.io.InputStream getInputStream()  
      boolean getIsFile()  
      java.lang.String getMimetype()  
      java.lang.String getName()  
      java.lang.String getValue()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormField

        public FormField​(org.apache.commons.fileupload.FileItem file)
        Construct
        Parameters:
        file - FileItem
    • 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