Package org.apache.commons.io.output
Class DeferredFileOutputStream.Builder
java.lang.Object
org.apache.commons.io.build.AbstractSupplier<DeferredFileOutputStream,DeferredFileOutputStream.Builder>
 
org.apache.commons.io.build.AbstractOriginSupplier<DeferredFileOutputStream,DeferredFileOutputStream.Builder>
 
org.apache.commons.io.build.AbstractStreamBuilder<DeferredFileOutputStream,DeferredFileOutputStream.Builder>
 
org.apache.commons.io.output.DeferredFileOutputStream.Builder
- All Implemented Interfaces:
- IOSupplier<DeferredFileOutputStream>
- Enclosing class:
- DeferredFileOutputStream
public static class DeferredFileOutputStream.Builder
extends AbstractStreamBuilder<DeferredFileOutputStream,DeferredFileOutputStream.Builder> 
Builds a new 
DeferredFileOutputStream.
 For example:
 DeferredFileOutputStream s = DeferredFileOutputStream.builder()
   .setBufferSize(4096)
   .setDirectory(dir)
   .setOutputFile(outputFile)
   .setPrefix(prefix)
   .setSuffix(suffix)
   .setThreshold(threshold)
   .get();
 The only super's aspect used is buffer size.
- Since:
- 2.12.0
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionget()Builds a newDeferredFileOutputStream.setDirectory(File directory) Sets the temporary file directory.setDirectory(Path directory) Sets the temporary file directory.setOutputFile(File outputFile) Sets the file to which data is saved beyond the threshold.setOutputFile(Path outputFile) Sets the file to which data is saved beyond the threshold.Sets the prefix to use for the temporary file.Sets the suffix to use for the temporary file.setThreshold(int threshold) Sets the number of bytes at which to trigger an event.Methods inherited from class org.apache.commons.io.build.AbstractStreamBuildergetBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getFile, getInputStream, getOpenOptions, getOutputStream, getPath, getRandomAccessFile, getReader, getWriter, setBufferSize, setBufferSize, setBufferSizeChecker, setBufferSizeDefault, setBufferSizeMax, setCharset, setCharset, setCharsetDefault, setOpenOptionsMethods inherited from class org.apache.commons.io.build.AbstractOriginSuppliercheckOrigin, 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, setWriterMethods inherited from class org.apache.commons.io.build.AbstractSupplierasThisMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.io.function.IOSupplierasSupplier, getUnchecked
- 
Constructor Details- 
Builderpublic Builder()Constructs a new builder ofDeferredFileOutputStream.
 
- 
- 
Method Details- 
getBuilds a newDeferredFileOutputStream.This builder uses the following aspects: - AbstractStreamBuilder.getBufferSize()
- threshold
- outputFile
- prefix
- suffix
- directory
 - Returns:
- a new instance.
- See Also:
 
- 
setDirectorySets the temporary file directory.- Parameters:
- directory- Temporary file directory.
- Returns:
- thisinstance.
 
- 
setDirectorySets the temporary file directory.- Parameters:
- directory- Temporary file directory.
- Returns:
- thisinstance.
- Since:
- 2.14.0
 
- 
setOutputFileSets the file to which data is saved beyond the threshold.- Parameters:
- outputFile- The file to which data is saved beyond the threshold.
- Returns:
- thisinstance.
 
- 
setOutputFileSets the file to which data is saved beyond the threshold.- Parameters:
- outputFile- The file to which data is saved beyond the threshold.
- Returns:
- thisinstance.
- Since:
- 2.14.0
 
- 
setPrefixSets the prefix to use for the temporary file.- Parameters:
- prefix- Prefix to use for the temporary file.
- Returns:
- thisinstance.
 
- 
setSuffixSets the suffix to use for the temporary file.- Parameters:
- suffix- Suffix to use for the temporary file.
- Returns:
- thisinstance.
 
- 
setThresholdSets the number of bytes at which to trigger an event.- Parameters:
- threshold- The number of bytes at which to trigger an event.
- Returns:
- thisinstance.
 
 
-