public class Http2OutputBuffer extends Object implements HttpOutputBuffer
Constructor and Description |
---|
Http2OutputBuffer(Response coyoteResponse,
org.apache.coyote.http2.Stream.StreamOutputBuffer streamOutputBuffer) |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(OutputFilter filter)
Add a filter at the start of the existing processing chain.
|
int |
doWrite(ByteBuffer chunk)
Write the given data to the response.
|
void |
end()
Finish writing the current response.
|
void |
flush()
Flushes any unwritten data to the client.
|
long |
getBytesWritten()
Bytes written to the underlying socket.
|
public Http2OutputBuffer(Response coyoteResponse, org.apache.coyote.http2.Stream.StreamOutputBuffer streamOutputBuffer)
public void addFilter(OutputFilter filter)
HttpOutputBuffer
methods of this object will be
passed to the filter. If appropriate, the filter will then call the same
method on the next HttpOutputBuffer in the chain until the call reaches
the StreamOutputBuffer.filter
- The filter to add to the start of the processing chainpublic int doWrite(ByteBuffer chunk) throws IOException
OutputBuffer
doWrite
in interface OutputBuffer
chunk
- data to writeIOException
- an underlying I/O error occurredpublic long getBytesWritten()
OutputBuffer
getBytesWritten
in interface OutputBuffer
public void end() throws IOException
HttpOutputBuffer
OutputBuffer.doWrite(java.nio.ByteBuffer)
during the execution of
this method.end
in interface HttpOutputBuffer
IOException
- If an I/O error occurs while writing to the clientpublic void flush() throws IOException
HttpOutputBuffer
flush
in interface HttpOutputBuffer
IOException
- If an I/O error occurs while flushingCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.