Package org.jboss.resteasy.spi
Class AsyncOutputWriter
java.lang.Object
org.jboss.resteasy.spi.AsyncOutputWriter
Utility class to write to an
AsyncOutputStream
using a given Charset
.-
Constructor Summary
ConstructorDescriptionAsyncOutputWriter
(AsyncOutputStream asyncOutputStream) Creates a new async writer using the default charset.AsyncOutputWriter
(AsyncOutputStream asyncOutputStream, Charset charset) Creates a new async writer using the specified charset. -
Method Summary
Modifier and TypeMethodDescriptionFlushes the underlying async output stream.asyncWrite
(String s) Writes the given string to the underlying async output stream.
-
Constructor Details
-
AsyncOutputWriter
Creates a new async writer using the default charset.- Parameters:
asyncOutputStream
- the async output stream on which to write
-
AsyncOutputWriter
Creates a new async writer using the specified charset.- Parameters:
asyncOutputStream
- the async output stream on which to writecharset
- the charset to use
-
-
Method Details
-
asyncWrite
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
Flushes the underlying async output stream.- Returns:
- a
CompletionStage
indicating completion.
-