ServerRequest.Reader<String>, BiFunction<Flow.Publisher<RequestChunk>,Class<? super R>,CompletionStage<? extends R>>public class StringContentReader extends Object implements ServerRequest.Reader<String>
ByteBuffer publisher to
a single string while using a given charset. If the charset cannot be used by the JVM,
the returned completion stage ends exceptionally with an IllegalArgumentException.| Modifier and Type | Method | Description |
|---|---|---|
CompletionStage<String> |
apply(Flow.Publisher<RequestChunk> publisher,
Class<? super String> clazz) |
Converts a
ByteBuffer publisher to a single string while using the associated
charset. |
andThenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapply, applyAndCastpublic CompletionStage<String> apply(Flow.Publisher<RequestChunk> publisher, Class<? super String> clazz)
ByteBuffer publisher to a single string while using the associated
charset. If the charset cannot be used by the JVM, the returned completion stage ends
exceptionally with an IllegalArgumentException.apply in interface BiFunction<Flow.Publisher<RequestChunk>,Class<? super R>,CompletionStage<? extends R>>apply in interface ServerRequest.Reader<String>publisher - the publisher from which to transform the byte chunks into a single
stringclazz - the requested type to be returned as a completion stage. The purpose of
this parameter is to know what the user of this Reader actually requested.IllegalArgumentExceptionCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.