Class StreamingResponseBody.ReaderBody
java.lang.Object
com.soklet.StreamingResponseBody.ReaderBody
- All Implemented Interfaces:
StreamingResponseBody
- Enclosing interface:
StreamingResponseBody
public static final class StreamingResponseBody.ReaderBody
extends Object
implements StreamingResponseBody
A streaming body backed by a
Reader supplier.- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from interface StreamingResponseBody
StreamingResponseBody.InputStreamBody, StreamingResponseBody.InputStreamBuilder, StreamingResponseBody.PublisherBody, StreamingResponseBody.ReaderBody, StreamingResponseBody.ReaderBuilder, StreamingResponseBody.WriterBodyModifier and TypeInterfaceDescriptionstatic final classA streaming body backed by anInputStreamsupplier.static final classBuilder for input-stream-backed response bodies.static final classA streaming body backed by aFlow.Publisher.static final classA streaming body backed by aReadersupplier.static final classBuilder for reader-backed response bodies.static final classA streaming body backed by a writer callback. -
Field Summary
Fields inherited from interface StreamingResponseBody
DEFAULT_INPUT_STREAM_BUFFER_SIZE_IN_BYTES, DEFAULT_MALFORMED_INPUT_ACTION, DEFAULT_READER_BUFFER_SIZE_IN_CHARACTERS, DEFAULT_UNMAPPABLE_CHARACTER_ACTIONModifier and TypeFieldDescriptionstatic final @NonNull CodingErrorActionstatic final @NonNull CodingErrorAction -
Method Summary
Modifier and TypeMethodDescriptionThe adapter buffer size.The charset used to encode characters to response bytes.Encoder behavior for malformed input.The supplier that opens the source reader.Encoder behavior for unmappable characters.Creates a new charset encoder configured with this body's error actions.
-
Method Details
-
getReaderSupplier
The supplier that opens the source reader.- Returns:
- the reader supplier
-
getCharset
The charset used to encode characters to response bytes.- Returns:
- the charset
-
getBufferSizeInCharacters
The adapter buffer size.- Returns:
- the adapter buffer size in characters
-
getMalformedInputAction
Encoder behavior for malformed input.- Returns:
- the malformed-input behavior
-
getUnmappableCharacterAction
Encoder behavior for unmappable characters.- Returns:
- the unmappable-character behavior
-
newEncoder
Creates a new charset encoder configured with this body's error actions.- Returns:
- a newly configured charset encoder
-