Package ninja.uploads

Interface FileItem


  • public interface FileItem
    This interface represents a file or form item that was received within a multipart/form-data POST request.
    Author:
    Christian Bourgeois
    • Method Detail

      • getFileName

        String getFileName()
        Returns the original filename in the client's filesystem, 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.
      • getInputStream

        InputStream getInputStream()
        Returns an InputStream that can be used to retrieve the contents of the file.
      • getFile

        File getFile()
        Returns an File that can be used to retrieve the contents of the file.
      • getContentType

        String getContentType()
        Returns the content type passed by the browser or null if not defined.
      • getHeaders

        org.apache.commons.fileupload.FileItemHeaders getHeaders()
        Returns the file item headers.
      • cleanup

        void cleanup()
        Cleanup resources if needed.