Class InputStreamStreamMessageBuilder
java.lang.Object
com.linecorp.armeria.common.stream.InputStreamStreamMessageBuilder
A builder for creating a
ByteStreamMessage
that reads data from the InputStream
and publishes using HttpData
.-
Method Summary
Modifier and TypeMethodDescriptionbufferSize
(int bufferSize) Sets the buffer size used to create a buffer used to read data from the source.build()
Returns a newly createdByteStreamMessage
with the properties set so far.executor
(ExecutorService executor) Sets the specifiedExecutorService
that performs blocking IO read operations.
-
Method Details
-
build
Returns a newly createdByteStreamMessage
with the properties set so far. -
executor
Sets the specifiedExecutorService
that performs blocking IO read operations. -
bufferSize
Sets the buffer size used to create a buffer used to read data from the source. The newly createdStreamMessage
will emitHttpData
s chunked to size less than or equal to the buffer size. If unspecified, 8192 is used by default.- Throws:
IllegalArgumentException
- if thebufferSize
is non-positive.
-