Class AsyncOutputWriter

    • Constructor Detail

      • 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 Detail

      • 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.