Interface FileItemInput

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  FileItemInput.ItemSkippedException
      This exception is thrown, if an attempt is made to read data from the InputStream, which has been returned by getInputStream(), after Iterator.hasNext() has been invoked on the iterator, which created the FileItemInput.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getContentType()
      Gets the content type passed by the browser or null if not defined.
      java.lang.String getFieldName()
      Gets the name of the field in the multipart form corresponding to this file item.
      java.io.InputStream getInputStream()
      Opens an InputStream, which allows to read the items contents.
      java.lang.String getName()
      Gets the original file name in the client's file system, as provided by the browser (or other client software).
      boolean isFormField()
      Tests whether or not a FileItem instance represents a simple form field.
    • Method Detail

      • getContentType

        java.lang.String getContentType()
        Gets the content type passed by the browser or null if not defined.
        Returns:
        The content type passed by the browser or null if not defined.
      • getFieldName

        java.lang.String getFieldName()
        Gets the name of the field in the multipart form corresponding to this file item.
        Returns:
        The name of the form field.
      • getInputStream

        java.io.InputStream getInputStream()
                                    throws java.io.IOException
        Opens an InputStream, which allows to read the items contents.
        Returns:
        The input stream, from which the items data may be read.
        Throws:
        java.lang.IllegalStateException - The method was already invoked on this item. It is not possible to recreate the data stream.
        java.io.IOException - An I/O error occurred.
        See Also:
        FileItemInput.ItemSkippedException
      • getName

        java.lang.String getName()
        Gets the original file name in the client's file system, as provided by the browser (or other client software). In most cases, this will be the base file name, without path information. However, some clients, such as the Opera browser, do include path information.
        Returns:
        The original file name in the client's file system.
      • isFormField

        boolean isFormField()
        Tests whether or not a FileItem instance represents a simple form field.
        Returns:
        true if the instance represents a simple form field; false if it represents an uploaded file.