Class PathStreamMessageBuilder
java.lang.Object
com.linecorp.armeria.common.stream.PathStreamMessageBuilder
A builder for creating a
ByteStreamMessage
that reads data from the Path
and publishes
using HttpData
.-
Method Summary
Modifier and TypeMethodDescriptionalloc
(ByteBufAllocator alloc) Sets the specifiedByteBufAllocator
.bufferSize
(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
-
alloc
Sets the specifiedByteBufAllocator
. If unspecified,ByteBufAllocator.DEFAULT
is used by default. -
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.
-