# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Exceptions
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Classes
  Class and 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 Exceptions
  Exceptions and 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 and Description
  org.apache.commons.fileupload.FileUploadBase.MAX_HEADER_SIZE This constant is no longer used. As of commons-fileupload 1.2, the only applicable limit is the total size of a parts headers, `MultipartStream.HEADER_PART_SIZE_MAX`.

- Deprecated Methods
  Method and Description
  org.apache.commons.fileupload.FileUploadBase.createItem(Map<String, String>, boolean) 1.2 This method is no longer used in favour of internally created instances of `FileItem`.
  org.apache.commons.fileupload.DefaultFileItemFactory.createItem(String, String, boolean, String) 1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.RequestContext.getContentLength() 1.3 Use `UploadContext.contentLength()` instead
  org.apache.commons.fileupload.portlet.PortletRequestContext.getContentLength() 1.3 Use `PortletRequestContext.contentLength()` instead
  org.apache.commons.fileupload.servlet.ServletRequestContext.getContentLength() 1.3 Use `ServletRequestContext.contentLength()` instead
  org.apache.commons.fileupload.FileUploadBase.getFieldName(Map<String, String>) 1.2.1 Use `FileUploadBase.getFieldName(FileItemHeaders)`.
  org.apache.commons.fileupload.DiskFileUpload.getFileItemFactory() 1.1 Use `FileUpload` instead.
  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.DiskFileUpload.getRepositoryPath() 1.1 Use `DiskFileItemFactory` instead.
  org.apache.commons.fileupload.DiskFileUpload.getSizeThreshold() 1.1 Use `DiskFileItemFactory` instead.
  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.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.

- Deprecated Constructors
  Constructor and 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.MultipartStream() 1.2.1 Use `MultipartStream.MultipartStream(InputStream, byte[], int, ProgressNotifier)`
  org.apache.commons.fileupload.MultipartStream(InputStream, byte[]) 1.2.1 Use `MultipartStream.MultipartStream(InputStream, byte[], int, ProgressNotifier)`.
  org.apache.commons.fileupload.MultipartStream(InputStream, byte[], int) 1.2.1 Use `MultipartStream.MultipartStream(InputStream, byte[], int, ProgressNotifier)`.
  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)`

Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.