public static class DeferredFileOutputStream.Builder extends AbstractStreamBuilder<DeferredFileOutputStream,DeferredFileOutputStream.Builder>
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.
get()| Constructor and Description |
|---|
Builder()
Constructs a new builder of
DeferredFileOutputStream. |
| Modifier and Type | Method and Description |
|---|---|
DeferredFileOutputStream |
get()
Builds a new
DeferredFileOutputStream. |
DeferredFileOutputStream.Builder |
setDirectory(File directory)
Sets the temporary file directory.
|
DeferredFileOutputStream.Builder |
setDirectory(Path directory)
Sets the temporary file directory.
|
DeferredFileOutputStream.Builder |
setOutputFile(File outputFile)
Sets the file to which data is saved beyond the threshold.
|
DeferredFileOutputStream.Builder |
setOutputFile(Path outputFile)
Sets the file to which data is saved beyond the threshold.
|
DeferredFileOutputStream.Builder |
setPrefix(String prefix)
Sets the prefix to use for the temporary file.
|
DeferredFileOutputStream.Builder |
setSuffix(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.
|
getBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getFile, getInputStream, getOpenOptions, getOutputStream, getPath, getRandomAccessFile, getReader, getWriter, setBufferSize, setBufferSize, setBufferSizeChecker, setBufferSizeDefault, setBufferSizeMax, setCharset, setCharset, setCharsetDefault, setOpenOptionscheckOrigin, 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, setWriterasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplier, getUncheckedpublic Builder()
DeferredFileOutputStream.public DeferredFileOutputStream get()
DeferredFileOutputStream.
This builder uses the following aspects:
AbstractStreamBuilder.getBufferSize()IOSupplier.getUnchecked()public DeferredFileOutputStream.Builder setDirectory(File directory)
directory - Temporary file directory.this instance.public DeferredFileOutputStream.Builder setDirectory(Path directory)
directory - Temporary file directory.this instance.public DeferredFileOutputStream.Builder setOutputFile(File outputFile)
outputFile - The file to which data is saved beyond the threshold.this instance.public DeferredFileOutputStream.Builder setOutputFile(Path outputFile)
outputFile - The file to which data is saved beyond the threshold.this instance.public DeferredFileOutputStream.Builder setPrefix(String prefix)
prefix - Prefix to use for the temporary file.this instance.public DeferredFileOutputStream.Builder setSuffix(String suffix)
suffix - Suffix to use for the temporary file.this instance.public DeferredFileOutputStream.Builder setThreshold(int threshold)
threshold - The number of bytes at which to trigger an event.this instance.