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
public abstract class AsyncOutputStream extends OutputStream
OutputStream which supports async IO operations. Use these operations if you need to support async IO.
-
-
Constructor Summary
Constructors Constructor Description AsyncOutputStream()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CompletionStage<Void>
asyncFlush()
Flushes this async output stream.CompletionStage<Void>
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
-
-
-
-
Method Detail
-
asyncFlush
public abstract CompletionStage<Void> asyncFlush()
Flushes this async output stream.- Returns:
- a
CompletionStage
notified on completion of the flush operation.
-
asyncWrite
public CompletionStage<Void> asyncWrite(byte[] bytes)
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
public abstract CompletionStage<Void> asyncWrite(byte[] bytes, int offset, int length)
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.
-
-