Class InputStreamConsumingPublisher

    • Constructor Detail

      • InputStreamConsumingPublisher

        public InputStreamConsumingPublisher()
    • Method Detail

      • doBlockingWrite

        public long doBlockingWrite​(InputStream inputStream)
        Write the provided input stream to the stream subscribed to this publisher.

        This method will block the calling thread to write until: (1) the provided input stream is fully consumed, (2) the subscription is cancelled, (3) reading from the input stream fails, or (4) cancel() is called.

        Returns:
        The amount of data written to the downstream subscriber.
      • subscribe

        public void subscribe​(org.reactivestreams.Subscriber<? super ByteBuffer> s)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<ByteBuffer>