FileItemHeadersSupport (Apache Tomcat 10.1.54 API Documentation)
Description: declaration: package: org.apache.tomcat.util.http.fileupload, interface: FileItemHeadersSupport

# Interface FileItemHeadersSupport

All Known Subinterfaces:
  `FileItem, FileItemStream`

All Known Implementing Classes:
  `DiskFileItem, FileItemStreamImpl`

public interface FileItemHeadersSupport
Interface that will indicate that `FileItem` or `FileItemStream` implementations will accept the headers read for the item.

Since:
  FileUpload 1.2.1
See Also:
  - `FileItem`
  - `FileItemStream`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FileItemHeaders`
  `getHeaders()`
  Returns the collection of headers defined locally within this item.
  `void`
  `setHeaders(FileItemHeaders headers)`
  Sets the headers read from within an item.

- ## Method Details

  - ### getHeaders

    FileItemHeaders getHeaders()
    Returns the collection of headers defined locally within this item.
    Returns:
      the `FileItemHeaders` present for this item.

  - ### setHeaders

    void setHeaders(FileItemHeaders headers)
    Sets the headers read from within an item. Implementations of `FileItem` or `FileItemStream` should implement this interface to be able to get the raw headers found within the item header block.
    Parameters:
      `headers` - the instance that holds onto the headers for this instance.