Class AsyncOutputWriter

java.lang.Object
org.jboss.resteasy.spi.AsyncOutputWriter

public class AsyncOutputWriter extends Object
Utility class to write to an AsyncOutputStream using a given Charset.
  • Constructor Details

    • AsyncOutputWriter

      public AsyncOutputWriter(AsyncOutputStream asyncOutputStream)
      Creates a new async writer using the default charset.
      Parameters:
      asyncOutputStream - the async output stream on which to write
    • AsyncOutputWriter

      public AsyncOutputWriter(AsyncOutputStream asyncOutputStream, Charset charset)
      Creates a new async writer using the specified charset.
      Parameters:
      asyncOutputStream - the async output stream on which to write
      charset - the charset to use
  • Method Details

    • asyncWrite

      public CompletionStage<Void> asyncWrite(String s)
      Writes the given string to the underlying async output stream.
      Parameters:
      string - the string to write, using the specified charset
      Returns:
      a CompletionStage indicating completion.
    • asyncFlush

      public CompletionStage<Void> asyncFlush()
      Flushes the underlying async output stream.
      Returns:
      a CompletionStage indicating completion.