org.apache.coyote

## Interface OutputBuffer

- All Known Subinterfaces:
    OutputFilter
  All Known Implementing Classes:
    AbstractAjpProcessor.SocketOutputBuffer, AbstractOutputBuffer, ChunkedOutputFilter, GzipOutputFilter, IdentityOutputFilter, InternalAprOutputBuffer, InternalAprOutputBuffer.SocketOutputBuffer, InternalNioOutputBuffer, InternalNioOutputBuffer.SocketOutputBuffer, InternalOutputBuffer, InternalOutputBuffer.OutputStreamOutputBuffer, VoidOutputFilter

      public interface OutputBuffer

  Output buffer. This class is used internally by the protocol implementation. All writes from higher level code should happen via Resonse.doWrite().
  Author:
    Remy Maucherat

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `doWrite(ByteChunk chunk, Response response)` Write the response.
    `long` | `getBytesWritten()` Bytes written to the underlying socket.

- - ### Method Detail

    - #### doWrite

          int doWrite(ByteChunk chunk,
                    Response response)
                      throws IOException

      Write the response. The caller ( tomcat ) owns the chunks.
      Parameters:
        `chunk` - data to write
        `response` - used to allow buffers that can be shared by multiple responses.
      Throws:
        `IOException`

    - #### getBytesWritten

          long getBytesWritten()

      Bytes written to the underlying socket. This includes the effects of chunking, compression, etc.
      Returns:
        Bytes written for the current request

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.