Class FileItemFactory.AbstractFileItemBuilder<I extends FileItem<I>,B extends FileItemFactory.AbstractFileItemBuilder<I,B>>
- java.lang.Object
-
- org.apache.commons.io.build.AbstractSupplier<T,B>
-
- org.apache.commons.io.build.AbstractOriginSupplier<T,B>
-
- org.apache.commons.io.build.AbstractStreamBuilder<I,B>
-
- org.apache.commons.fileupload2.core.FileItemFactory.AbstractFileItemBuilder<I,B>
-
- Type Parameters:
I- the type ofFileItemto 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()Gets the content type.java.lang.StringgetFieldName()Gets the field name.org.apache.commons.io.FileCleaningTrackergetFileCleaningTracker()Gets the file cleaning tracker.FileItemHeadersgetFileItemHeaders()Gets the field item headers.java.lang.StringgetFileName()Gets the file name.booleanisFormField()Tests whether this is a form field.static FileItemHeadersnewFileItemHeaders()Create a new FileItemHeaders implementation.BsetContentType(java.lang.String contentType)Sets the content type.BsetFieldName(java.lang.String fieldName)Sets the field name.BsetFileCleaningTracker(org.apache.commons.io.FileCleaningTracker fileCleaningTracker)Sets the file cleaning tracker.BsetFileItemHeaders(FileItemHeaders fileItemHeaders)Sets the file item headers.BsetFileName(java.lang.String fileName)Sets the file name.BsetFormField(boolean isFormField)Sets whether this is a form field.-
Methods inherited from class org.apache.commons.io.build.AbstractStreamBuilder
getBufferSize, getBufferSizeDefault, 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
-
-
-
-
Constructor Detail
-
AbstractFileItemBuilder
public AbstractFileItemBuilder()
Constructs a new instance.
-
-
Method Detail
-
newFileItemHeaders
public static FileItemHeaders newFileItemHeaders()
Create a new FileItemHeaders implementation.- Returns:
- a new FileItemHeaders implementation.
-
getContentType
public java.lang.String getContentType()
Gets the content type.- Returns:
- the content type.
-
getFieldName
public java.lang.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 java.lang.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(java.lang.String contentType)
Sets the content type.- Parameters:
contentType- the content type.- Returns:
thisinstance.
-
setFieldName
public B setFieldName(java.lang.String fieldName)
Sets the field name.- Parameters:
fieldName- the field name.- Returns:
thisinstance.
-
setFileCleaningTracker
public B setFileCleaningTracker(org.apache.commons.io.FileCleaningTracker fileCleaningTracker)
Sets the file cleaning tracker.- Parameters:
fileCleaningTracker- the file cleaning tracker.- Returns:
thisinstance.
-
setFileItemHeaders
public B setFileItemHeaders(FileItemHeaders fileItemHeaders)
Sets the file item headers.- Parameters:
fileItemHeaders- the item headers.- Returns:
thisinstance.
-
setFileName
public B setFileName(java.lang.String fileName)
Sets the file name.- Parameters:
fileName- the file name.- Returns:
thisinstance.
-
setFormField
public B setFormField(boolean isFormField)
Sets whether this is a form field.- Parameters:
isFormField- whether this is a form field.- Returns:
thisinstance.
-
-