public class StringContentReader extends java.lang.Object implements Reader<java.lang.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 and Description |
|---|---|
java.util.concurrent.CompletionStage<java.lang.String> |
apply(Flow.Publisher<DataChunk> publisher,
java.lang.Class<? super java.lang.String> clazz)
Converts a
ByteBuffer publisher to a single string while using the associated
charset. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapply, applyAndCastpublic java.util.concurrent.CompletionStage<java.lang.String> apply(Flow.Publisher<DataChunk> publisher, java.lang.Class<? super java.lang.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 Reader<java.lang.String>apply in interface java.util.function.BiFunction<Flow.Publisher<DataChunk>,java.lang.Class<? super java.lang.String>,java.util.concurrent.CompletionStage<? extends java.lang.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.