public static class QueueInputStream.Builder extends org.apache.commons.io.build.AbstractStreamBuilder<QueueInputStream,QueueInputStream.Builder>
QueueInputStream
instance.
For example:
QueueInputStream s = QueueInputStream.builder()
.setBlockingQueue(new LinkedBlockingQueue<>())
.setTimeout(Duration.ZERO)
.get();
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
QueueInputStream |
get()
Constructs a new instance.
|
QueueInputStream.Builder |
setBlockingQueue(java.util.concurrent.BlockingQueue<java.lang.Integer> blockingQueue)
Sets backing queue for the stream.
|
QueueInputStream.Builder |
setTimeout(java.time.Duration timeout)
Sets the polling timeout.
|
getCharset, setBufferSize, setBufferSize, setCharset, setCharset, setOpenOptions
setByteArray, setCharSequence, setFile, setFile, setInputStream, setOutputStream, setPath, setPath, setReader, setURI, setWriter
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asSupplier
public QueueInputStream get()
This builder use the aspects BlockingQueue and timeout.
public QueueInputStream.Builder setBlockingQueue(java.util.concurrent.BlockingQueue<java.lang.Integer> blockingQueue)
blockingQueue
- backing queue for the stream.public QueueInputStream.Builder setTimeout(java.time.Duration timeout)
timeout
- the polling timeout.Copyright © 2010 - 2023 Adobe. All Rights Reserved