Package org.jboss.resteasy.spi
Class AsyncOutputStream
java.lang.Object
java.io.OutputStream
org.jboss.resteasy.spi.AsyncOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
BlockingAsyncOutputStream
,ChunkOutputStream
,ChunkOutputStream
,CommitHeaderAsyncOutputStream
,HeaderFlushedAsyncOutputStream
,HttpServletResponseWrapper.DeferredOutputStream
OutputStream which supports async IO operations. Use these operations if you need to support async IO.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract CompletionStage<Void>
Flushes this async output stream.asyncWrite
(byte[] bytes) Writes to this async output stream.abstract CompletionStage<Void>
asyncWrite
(byte[] bytes, int offset, int length) Writes to this async output stream.Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write, write
-
Constructor Details
-
AsyncOutputStream
public AsyncOutputStream()
-
-
Method Details
-
asyncFlush
Flushes this async output stream.- Returns:
- a
CompletionStage
notified on completion of the flush operation.
-
asyncWrite
Writes to this async output stream. Equivalent toasyncWrite(bytes, 0, bytes.length
.- Parameters:
bytes
- the bytes to write- Returns:
- a
CompletionStage
notified on completion of the write operation.
-
asyncWrite
Writes to this async output stream.- Parameters:
bytes
- the bytes to writeoffset
- the offset from which to start writing in the given byte array.length
- the number of bytes to write from the given byte array- Returns:
- a
CompletionStage
notified on completion of the write operation.
-