Interface FileItem

All Superinterfaces:
All Known Implementing Classes:

public interface FileItem extends FileItemHeadersSupport

This class represents a file or form item that was received within a multipart/form-data POST request.

After retrieving an instance of this class from a FileUpload instance (see #parseRequest(RequestContext)), you may either request all contents of the file at once using get() or request an InputStream with getInputStream() and process the file without attempting to load it into memory, which may come handy with large files.

While this interface does not extend javax.activation.DataSource per se (to avoid a seldom used dependency), several of the defined methods are specifically defined with the same signatures as methods in that interface. This allows an implementation of this interface to also implement javax.activation.DataSource with minimal additional work.

FileUpload 1.3 additionally implements FileItemHeadersSupport