Package io.vertx.httpproxy

## Interface Body

-     public interface Body

  Handles the HTTP proxy body.

  Author:
    Julien Viet

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Body` | `body​(Buffer buffer)` |
    `static Body` | `body​(Buffer buffer, MediaType mediaType)` | Create a new `Body` instance.
    `static Body` | `body​(ReadStream<Buffer> stream)` | Create a new `Body` instance.
    `static Body` | `body​(ReadStream<Buffer> stream, long len)` | Create a new `Body` instance.
    `static Body` | `body​(ReadStream<Buffer> stream, long len, MediaType mediatype)` |
    `static Body` | `body​(ReadStream<Buffer> stream, long len, String mediatype)` |
    `long` | `length()` | Get length of the `Body`.
    `String` | `mediaType()` |
    `ReadStream<Buffer>` | `stream()` | Get stream of the `Body`.

- - ### Method Detail

    - #### body

          static Body body​(ReadStream<Buffer> stream,
                           long len)

      Create a new `Body` instance.
      Parameters:
        `stream` - the `ReadStream` of the body
        `len` - the determined length of the body
      Returns:
        a reference to this, so the API can be used fluently

    - #### body

          static Body body​(ReadStream<Buffer> stream,
                           long len,
                           MediaType mediatype)

    - #### body

          static Body body​(ReadStream<Buffer> stream,
                           long len,
                           String mediatype)

    - #### body

          static Body body​(ReadStream<Buffer> stream)

      Create a new `Body` instance.
      Parameters:
        `stream` - the `ReadStream` of the body
      Returns:
        a reference to this, so the API can be used fluently

    - #### body

          static Body body​(Buffer buffer)

    - #### body

          static Body body​(Buffer buffer,
                           MediaType mediaType)

      Create a new `Body` instance.
      Parameters:
        `buffer` - the `Buffer` of the body
        `mediaType` - the body media type
      Returns:
        a reference to this, so the API can be used fluently

    - #### mediaType

          String mediaType()

      Returns:
        the media type of this body

    - #### length

          long length()

      Get length of the `Body`.
      Returns:
        the body length or `-1` if that can't be determined

    - #### stream

          ReadStream<Buffer> stream()

      Get stream of the `Body`.
      Returns:
        the body stream