An instance of this is created and associated to every instance of
HttpServerRequest that.

It allows the developer to control the HTTP response that is sent back to the
client for a particular HTTP request.

It contains methods that allow HTTP headers and trailers to be set, and for a body to be written out to the response.

It also allows files to be streamed by the kernel directly from disk to the
outgoing HTTP connection, bypassing user space altogether (where supported by
the underlying operating system). This is a very efficient way of
serving files from the server since buffers do not have to be read one by one
from the file and written to the outgoing socket.

It implements WriteStream so it can be used with
Pump to pump data with flow control.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

write

Write some data to the stream. The data is put on an internal write queue, and the write actually happens
asynchronously. To avoid running out of memory by putting too much on the write queue,
check the WriteStream.writeQueueFull() method before writing. This is done automatically if using a Pump.

setWriteQueueMaxSize

Set the maximum size of the write queue to maxSize. You will still be able to write to the stream even
if there is more than maxSize items in the write queue. This is used as an indicator by classes such as
Pump to provide flow control.

setChunked

If chunked is true, this response will use HTTP chunked encoding, and each call to write to the body
will correspond to a new HTTP chunk sent on the wire.

If chunked encoding is used the HTTP header Transfer-Encoding with a value of Chunked will be
automatically inserted in the response.

If chunked is false, this response will not use HTTP chunked encoding, and therefore the total size
of any data that is written in the respone body must be set in the Content-Length header before any
data is written out.

An HTTP chunked response is typically used when you do not know the total size of the request body up front.

sendFile

Ask the OS to stream a file as specified by filename directly
from disk to the outgoing connection, bypassing userspace altogether
(where supported by the underlying operating system.
This is a very efficient way to serve files.

The actual serve is asynchronous and may not complete until some time after this method has returned.

bodyEndHandler

Provides a handler that will be called after the last part of the body is written to the wire.
The handler is called asynchronously of when the response has been received by the client.
This provides a hook allowing you to do more operations once the request has been sent over the wire
such as resource cleanup.