Package io.helidon.reactive.media.common
Class ContentReaders
java.lang.Object
io.helidon.reactive.media.common.ContentReaders
Utility class that provides standalone mechanisms for reading message body
content.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Single<byte[]>readBytes(Flow.Publisher<DataChunk> chunks) Collect theDataChunkof the given publisher into a single byte array.readString(Flow.Publisher<DataChunk> chunks, Charset charset) readURLEncodedString(Flow.Publisher<DataChunk> chunks, Charset charset)
-
Method Details
-
readBytes
Collect theDataChunkof the given publisher into a single byte array.- Parameters:
chunks- source publisher- Returns:
- Single
- Since:
- 2.0.0
-
readString
- Parameters:
chunks- source publishercharset- charset to use for decoding the bytes- Returns:
- Single
-
readURLEncodedString
public static Single<String> readURLEncodedString(Flow.Publisher<DataChunk> chunks, Charset charset) - Parameters:
chunks- source publishercharset- charset to use for decoding the input- Returns:
- Single
- Since:
- 2.0.0
-