public static class QueueInputStream.Builder extends 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()
Gets a result.
|
QueueInputStream.Builder |
setBlockingQueue(BlockingQueue<Integer> blockingQueue)
Sets backing queue for the stream.
|
QueueInputStream.Builder |
setTimeout(Duration timeout)
Sets the polling timeout.
|
getBufferSize, getBufferSizeDefault, getCharset, getCharsetDefault, setBufferSize, setBufferSize, setBufferSizeDefault, setCharset, setCharset, setCharsetDefault
checkOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setReader, setURI, setWriter
asThis
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asSupplier
public Builder()
public QueueInputStream get()
IOSupplier
public QueueInputStream.Builder setBlockingQueue(BlockingQueue<Integer> blockingQueue)
blockingQueue
- backing queue for the stream.public QueueInputStream.Builder setTimeout(Duration timeout)
timeout
- the polling timeout.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.