Top Fields Constructors Methods
org.apache.coyote.http2

public Class Http2OutputBuffer

extends Object
implements HttpOutputBuffer
Class Inheritance
All Implemented Interfaces
org.apache.coyote.http11.HttpOutputBuffer, org.apache.coyote.OutputBuffer
Imports
java.io.IOException, java.nio.ByteBuffer, org.apache.coyote.Response, org.apache.coyote.http11.HttpOutputBuffer, .OutputFilter, org.apache.coyote.http2.Stream.StreamOutputBuffer

Field Summary

Modifier and TypeField and Description
private final Response
private HttpOutputBuffer

Constructor Summary

AccessConstructor and Description
public
Http2OutputBuffer(Response coyoteResponse, Stream.StreamOutputBuffer streamOutputBuffer)

Method Summary

Modifier and TypeMethod and Description
public void
addFilter(OutputFilter
The filter to add to the start of the processing chain
filter
)

Add a filter at the start of the existing processing chain.

public int
doWrite(ByteBuffer
data to write
chunk
)

Implements org.apache.coyote.OutputBuffer.doWrite.

Write the given data to the response.

public void
end()

Implements org.apache.coyote.http11.HttpOutputBuffer.end.

Finish writing the current response.

public void
flush()

Implements org.apache.coyote.http11.HttpOutputBuffer.flush.

Flushes any unwritten data to the client.

public long
getBytesWritten()

Implements org.apache.coyote.OutputBuffer.getBytesWritten.

Bytes written to the underlying socket.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

coyoteResponseback to summary
private final Response coyoteResponse
nextback to summary
private HttpOutputBuffer next

Constructor Detail

Http2OutputBufferback to summary
public Http2OutputBuffer(Response coyoteResponse, Stream.StreamOutputBuffer streamOutputBuffer)

Method Detail

addFilterback to summary
public void addFilter(OutputFilter filter)

Add a filter at the start of the existing processing chain. Subsequent calls to the 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.

Parameters
filter:OutputFilter

The filter to add to the start of the processing chain

doWriteback to summary
public int doWrite(ByteBuffer chunk) throws IOException

Implements org.apache.coyote.OutputBuffer.doWrite.

Doc from org.apache.coyote.OutputBuffer.doWrite.

Write the given data to the response. The caller owns the chunks.

Parameters
chunk:ByteBuffer

data to write

Returns:int

The number of bytes written which may be less than available in the input chunk

Annotations
@Override
Exceptions
IOException:
an underlying I/O error occurred
endback to summary
public void end() throws IOException

Implements org.apache.coyote.http11.HttpOutputBuffer.end.

Doc from org.apache.coyote.http11.HttpOutputBuffer.end.

Finish writing the current response. It is acceptable to write extra bytes using doWrite(java.nio.ByteBuffer) during the execution of this method.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs while writing to the client
flushback to summary
public void flush() throws IOException

Implements org.apache.coyote.http11.HttpOutputBuffer.flush.

Doc from org.apache.coyote.http11.HttpOutputBuffer.flush.

Flushes any unwritten data to the client.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs while flushing
getBytesWrittenback to summary
public long getBytesWritten()

Implements org.apache.coyote.OutputBuffer.getBytesWritten.

Doc from org.apache.coyote.OutputBuffer.getBytesWritten.

Bytes written to the underlying socket. This includes the effects of chunking, compression, etc.

Returns:long

Bytes written for the current request

Annotations
@Override