# Class FileItemFactory.AbstractFileItemBuilder<I extends FileItem<I>, B extends FileItemFactory.AbstractFileItemBuilder<I,B>>

java.lang.Object
org.apache.commons.io.build.AbstractSupplier<I,B>
org.apache.commons.io.build.AbstractOriginSupplier<I,B>
org.apache.commons.io.build.AbstractStreamBuilder<I,B>
org.apache.commons.fileupload2.core.FileItemFactory.AbstractFileItemBuilder<I,B>

Type Parameters:
  `I` - the type of `FileItem` to build.
  `B` - the type of builder subclass.

All Implemented Interfaces:
  `org.apache.commons.io.function.IOSupplier<I>`

Direct Known Subclasses:
  `DiskFileItem.Builder`

Enclosing interface:
  `FileItemFactory<I extends FileItem<I>>`

public abstract static class FileItemFactory.AbstractFileItemBuilder<I extends FileItem<I>, B extends FileItemFactory.AbstractFileItemBuilder<I,B>> extends org.apache.commons.io.build.AbstractStreamBuilder<I,B>
Abstracts building for subclasses.

## Constructor Summary

Constructors
Constructor
Description
`AbstractFileItemBuilder()`
Constructs a new instance.

## Method Summary

Modifier and Type
Method
Description
`String`
`getContentType()`
Gets the content type.
`String`
`getFieldName()`
Gets the field name.
`org.apache.commons.io.FileCleaningTracker`
`getFileCleaningTracker()`
Gets the file cleaning tracker.
`FileItemHeaders`
`getFileItemHeaders()`
Gets the field item headers.
`String`
`getFileName()`
Gets the file name.
`boolean`
`isFormField()`
Tests whether this is a form field.
`static FileItemHeaders`
`newFileItemHeaders()`
Create a new FileItemHeaders implementation.
`B`
`setContentType(String contentType)`
Sets the content type.
`B`
`setFieldName(String fieldName)`
Sets the field name.
`B`
`setFileCleaningTracker(org.apache.commons.io.FileCleaningTracker fileCleaningTracker)`
Sets the file cleaning tracker.
`B`
`setFileItemHeaders(FileItemHeaders fileItemHeaders)`
Sets the file item headers.
`B`
`setFileName(String fileName)`
Sets the file name.
`B`
`setFormField(boolean isFormField)`
Sets whether this is a form field.

### Methods inherited from class org.apache.commons.io.build.AbstractStreamBuilder

`getBufferSize, getBufferSizeDefault, getByteArray, getChannel, getCharSequence, getCharset, getCharsetDefault, getFile, getInputStream, getOpenOptions, getOutputStream, getPath, getRandomAccessFile, getReader, getWriter, setBufferSize, setBufferSize, setBufferSizeChecker, setBufferSizeDefault, setBufferSizeMax, setCharset, setCharset, setCharsetDefault, setOpenOptions`

### Methods inherited from class org.apache.commons.io.build.AbstractOriginSupplier

`checkOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newChannelOrigin, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newRandomAccessFileOrigin, newRandomAccessFileOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setChannel, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setRandomAccessFile, setRandomAccessFile, setReader, setURI, setWriter`

### Methods inherited from class org.apache.commons.io.build.AbstractSupplier

`asThis`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.commons.io.function.IOSupplier

`asSupplier, get, getUnchecked`

## Constructor Details

### AbstractFileItemBuilder

public AbstractFileItemBuilder()
Constructs a new instance.

## Method Details

### newFileItemHeaders

public static FileItemHeaders newFileItemHeaders()
Create a new FileItemHeaders implementation.

Returns:
  a new FileItemHeaders implementation.

### getContentType

public String getContentType()
Gets the content type.

Returns:
  the content type.

### getFieldName

public String getFieldName()
Gets the field name.

Returns:
  the field name.

### getFileCleaningTracker

public org.apache.commons.io.FileCleaningTracker getFileCleaningTracker()
Gets the file cleaning tracker.

Returns:
  the file cleaning tracker.

### getFileItemHeaders

public FileItemHeaders getFileItemHeaders()
Gets the field item headers.

Returns:
  the field item headers.

### getFileName

public String getFileName()
Gets the file name.

Returns:
  the file name.

### isFormField

public boolean isFormField()
Tests whether this is a form field.

Returns:
  whether this is a form field.

### setContentType

public B setContentType(String contentType)
Sets the content type.

Parameters:
  `contentType` - the content type.
Returns:
  `this` instance.

### setFieldName

public B setFieldName(String fieldName)
Sets the field name.

Parameters:
  `fieldName` - the field name.
Returns:
  `this` instance.

### setFileCleaningTracker

public B setFileCleaningTracker(org.apache.commons.io.FileCleaningTracker fileCleaningTracker)
Sets the file cleaning tracker.

Parameters:
  `fileCleaningTracker` - the file cleaning tracker.
Returns:
  `this` instance.

### setFileItemHeaders

public B setFileItemHeaders(FileItemHeaders fileItemHeaders)
Sets the file item headers.

Parameters:
  `fileItemHeaders` - the item headers.
Returns:
  `this` instance.

### setFileName

public B setFileName(String fileName)
Sets the file name.

Parameters:
  `fileName` - the file name.
Returns:
  `this` instance.

### setFormField

public B setFormField(boolean isFormField)
Sets whether this is a form field.

Parameters:
  `isFormField` - whether this is a form field.
Returns:
  `this` instance.