Class MultiFromOutputStream

    • Constructor Detail

      • MultiFromOutputStream

        protected MultiFromOutputStream()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create new output stream that Flow.Publisher publishes any data written to it as ByteBuffer events.
    • Method Detail

      • onRequest

        public MultiFromOutputStream onRequest​(BiConsumer<Long,​Long> requestCallback)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Callback executed when request signal from downstream arrive.
        • param n the requested count.
        • param demand the current total cumulative requested count, ranges between [0, Long.MAX_VALUE] where the max indicates that this publisher is unbounded.
        Parameters:
        requestCallback - to be executed
        Returns:
        this OutputStreamMulti
      • write

        public void write​(byte[] b)
                   throws IOException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Writes byte array after possibly publishing internal buffer for single-byte writes.
        Overrides:
        write in class OutputStream
        Parameters:
        b - Byte array.
        Throws:
        IOException - If error while writing.
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws IOException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Writes byte array given an offset and length after possibly publishing internal buffer for single-byte writes.
        Overrides:
        write in class OutputStream
        Parameters:
        b - Byte array.
        Throws:
        IOException - If error while writing.
      • write

        public void write​(int b)
                   throws IOException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Attempts to buffer single-byte reads until buffer is full.
        Specified by:
        write in class OutputStream
        Parameters:
        b - Byte to read.
        Throws:
        IOException - If error while writing.
      • flush

        public void flush()
                   throws IOException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Send empty buffer as an indication of a user-requested flush.
        Specified by:
        flush in interface Flushable
        Overrides:
        flush in class OutputStream
        Throws:
        IOException - If error while writing.