public static class DeferredFileOutputStream.Builder extends org.apache.commons.io.build.AbstractStreamBuilder<DeferredFileOutputStream,DeferredFileOutputStream.Builder>
DeferredFileOutputStream instance.
For example:
DeferredFileOutputStream s = DeferredFileOutputStream.builder()
.setPath(path)
.setBufferSize(4096)
.setDirectory(dir)
.setOutputFile(outputFile)
.setPrefix(prefix)
.setSuffix(suffix)
.setThreshold(threshold)
.get();
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
DeferredFileOutputStream |
get()
Constructs a new instance.
|
DeferredFileOutputStream.Builder |
setDirectory(java.io.File directory)
Sets the temporary file directory.
|
DeferredFileOutputStream.Builder |
setOutputFile(java.io.File outputFile)
Sets the file to which data is saved beyond the threshold.
|
DeferredFileOutputStream.Builder |
setPrefix(java.lang.String prefix)
Sets the prefix to use for the temporary file.
|
DeferredFileOutputStream.Builder |
setSuffix(java.lang.String suffix)
Sets the suffix to use for the temporary file.
|
DeferredFileOutputStream.Builder |
setThreshold(int threshold)
Sets the number of bytes at which to trigger an event.
|
getCharset, setBufferSize, setBufferSize, setCharset, setCharset, setOpenOptionssetByteArray, setCharSequence, setFile, setFile, setInputStream, setOutputStream, setPath, setPath, setReader, setURI, setWriterequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplierpublic DeferredFileOutputStream get()
This builder use the aspects threshold, outputFile, prefix, suffix, directory, buffer size.
public DeferredFileOutputStream.Builder setDirectory(java.io.File directory)
directory - Temporary file directory.public DeferredFileOutputStream.Builder setOutputFile(java.io.File outputFile)
outputFile - The file to which data is saved beyond the threshold.public DeferredFileOutputStream.Builder setPrefix(java.lang.String prefix)
prefix - Prefix to use for the temporary file.public DeferredFileOutputStream.Builder setSuffix(java.lang.String suffix)
suffix - Suffix to use for the temporary file.public DeferredFileOutputStream.Builder setThreshold(int threshold)
threshold - The number of bytes at which to trigger an event.Copyright © 2010 - 2023 Adobe. All Rights Reserved