Interface AsyncStreamingOutput

  • public interface AsyncStreamingOutput
    A type that may be used as a resource method return value or as the entity in a Response when the application wishes to stream the output. This is a lightweight alternative to a AsyncMessageBodyWriter.
    Paul Sandoz, Marc Hadley
    See Also:
    AsyncMessageBodyWriter, Response
    • Method Detail

      • asyncWrite

        CompletionStage<Void> asyncWrite​(AsyncOutputStream output)
        Called to write the message body.
        output - the OutputStream to write to.
        IOException - if an IO error is encountered - if a specific HTTP error response needs to be produced. Only effective if thrown prior to any bytes being written to output.