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 ofFileItem
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 -
Method Summary
Modifier and TypeMethodDescriptionGets the content type.Gets the field name.org.apache.commons.io.FileCleaningTracker
Gets the file cleaning tracker.Gets the field item headers.Gets the file name.boolean
Tests whether this is a form field.static FileItemHeaders
Create a new FileItemHeaders implementation.setContentType
(String contentType) Sets the content type.setFieldName
(String fieldName) Sets the field name.setFileCleaningTracker
(org.apache.commons.io.FileCleaningTracker fileCleaningTracker) Sets the file cleaning tracker.setFileItemHeaders
(FileItemHeaders fileItemHeaders) Sets the file item headers.setFileName
(String fileName) Sets the file name.setFormField
(boolean isFormField) Sets whether this is a form field.Methods inherited from class org.apache.commons.io.build.AbstractStreamBuilder
getBufferSize, getBufferSizeDefault, 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, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newRandomAccessFileOrigin, newRandomAccessFileOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setRandomAccessFile, setRandomAccessFile, setReader, setURI, setWriter
-
Constructor Details
-
AbstractFileItemBuilder
public AbstractFileItemBuilder()Constructs a new instance.
-
-
Method Details
-
newFileItemHeaders
Create a new FileItemHeaders implementation.- Returns:
- a new FileItemHeaders implementation.
-
getContentType
Gets the content type.- Returns:
- the content type.
-
getFieldName
Gets the field name.- Returns:
- the field name.
-
getFileCleaningTracker
Gets the file cleaning tracker.- Returns:
- the file cleaning tracker.
-
getFileItemHeaders
Gets the field item headers.- Returns:
- the field item headers.
-
getFileName
Gets the file name.- Returns:
- the file name.
-
isFormField
Tests whether this is a form field.- Returns:
- whether this is a form field.
-
setContentType
Sets the content type.- Parameters:
contentType
- the content type.- Returns:
this
instance.
-
setFieldName
Sets the field name.- Parameters:
fieldName
- the field name.- Returns:
this
instance.
-
setFileCleaningTracker
Sets the file cleaning tracker.- Parameters:
fileCleaningTracker
- the file cleaning tracker.- Returns:
this
instance.
-
setFileItemHeaders
Sets the file item headers.- Parameters:
fileItemHeaders
- the item headers.- Returns:
this
instance.
-
setFileName
Sets the file name.- Parameters:
fileName
- the file name.- Returns:
this
instance.
-
setFormField
Sets whether this is a form field.- Parameters:
isFormField
- whether this is a form field.- Returns:
this
instance.
-