# Deprecated API

## Contents

- Classes
- Exception Classes
- Fields
- Methods
- Constructors

- Deprecated Classes
  Class
  Description
  org.apache.commons.fileupload.DefaultFileItem
  1.1 Use `DiskFileItem` instead.
  org.apache.commons.fileupload.DefaultFileItemFactory
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload
  1.1 Use `ServletFileUpload` together with `DiskFileItemFactory` instead.

- Deprecated Exception Classes
  Exception Class
  Description
  org.apache.commons.fileupload.FileUploadBase.UnknownSizeException
  1.2 As of commons-fileupload 1.2, the presence of a content-length header is no longer required.

- Deprecated Fields
  Field
  Description
  org.apache.commons.fileupload.FileUploadBase.MAX_HEADER_SIZE
  This constant is no longer used. As of commons-fileupload 1.6, the applicable limit is the total size of a single part's headers, `FileUploadBase.getPartHeaderSizeMax()` in bytes.
  org.apache.commons.fileupload.MultipartStream.HEADER_PART_SIZE_MAX
  Unused. Replaced by `MultipartStream.getPartHeaderSizeMax()`.

- Deprecated Methods
  Method
  Description
  org.apache.commons.fileupload.DefaultFileItemFactory.createItem(String, String, boolean, String)
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload.getFileItemFactory()
  1.1 Use `FileUpload` instead.
  org.apache.commons.fileupload.DiskFileUpload.getRepositoryPath()
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload.getSizeThreshold()
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload.parseRequest(HttpServletRequest, int, long, String)
  1.1 Use `ServletFileUpload` instead.
  org.apache.commons.fileupload.DiskFileUpload.setFileItemFactory(FileItemFactory)
  1.1 Use `FileUpload` instead.
  org.apache.commons.fileupload.DiskFileUpload.setRepositoryPath(String)
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload.setSizeThreshold(int)
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.FileUploadBase.createItem(Map<String, String>, boolean)
  1.2 This method is no longer used in favor of internally created instances of `FileItem`.
  org.apache.commons.fileupload.FileUploadBase.getFieldName(Map<String, String>)
  1.2.1 Use `FileUploadBase.getFieldName(FileItemHeaders)`.
  org.apache.commons.fileupload.FileUploadBase.getFileName(Map<String, String>)
  1.2.1 Use `FileUploadBase.getFileName(FileItemHeaders)`.
  org.apache.commons.fileupload.FileUploadBase.getHeader(Map<String, String>, String)
  1.2.1 Use `FileItemHeaders.getHeader(String)`.
  org.apache.commons.fileupload.FileUploadBase.isMultipartContent(HttpServletRequest)
  1.1 Use the method on `ServletFileUpload` instead.
  org.apache.commons.fileupload.FileUploadBase.parseHeaders(String)
  1.2.1 Use `FileUploadBase.getParsedHeaders(String)`
  org.apache.commons.fileupload.FileUploadBase.parseRequest(HttpServletRequest)
  1.1 Use `ServletFileUpload.parseRequest(HttpServletRequest)` instead.
  org.apache.commons.fileupload.portlet.PortletRequestContext.getContentLength()
  1.3 Use `PortletRequestContext.contentLength()` instead
  org.apache.commons.fileupload.RequestContext.getContentLength()
  1.3 Use `UploadContext.contentLength()` instead
  org.apache.commons.fileupload.servlet.ServletRequestContext.getContentLength()
  1.3 Use `ServletRequestContext.contentLength()` instead

- Deprecated Constructors
  Constructor
  Description
  org.apache.commons.fileupload.DefaultFileItem(String, String, boolean, String, int, File)
  1.1 Use `DiskFileItem` instead.
  org.apache.commons.fileupload.DefaultFileItemFactory()
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DefaultFileItemFactory(int, File)
  1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload()
  1.1 Use `FileUpload` instead.
  org.apache.commons.fileupload.DiskFileUpload(DefaultFileItemFactory)
  1.1 Use `FileUpload` instead.
  org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException()
  1.2 Replaced by `SizeLimitExceededException(String, long, long)`
  org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException(String)
  1.2 Replaced by `SizeLimitExceededException(String, long, long)`
  org.apache.commons.fileupload.MultipartStream()
  1.2.1 Use `MultipartStream(InputStream, byte[], int, ProgressNotifier)`
  org.apache.commons.fileupload.MultipartStream(InputStream, byte[])
  1.2.1 Use `MultipartStream(InputStream, byte[], int, ProgressNotifier)`.
  org.apache.commons.fileupload.MultipartStream(InputStream, byte[], int)
  1.2.1 Use `MultipartStream(InputStream, byte[], int, ProgressNotifier)`.