io.vertx.rxjava.ext.web.codec

## Class BodyCodec<T>

- java.lang.Object
- - io.vertx.rxjava.ext.web.codec.BodyCodec<T>

-     public class BodyCodec<T>
      extends Object

  A codec for encoding and decoding HTTP bodies.

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<BodyCodec>` | `__TYPE_ARG`
    `TypeArg<T>` | `__typeArg_0`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BodyCodec(BodyCodec delegate)`
    `BodyCodec(BodyCodec delegate, TypeArg<T> typeArg_0)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BodyCodec<Buffer>` | `buffer()`
    `static <T> BodyCodec<T>` | `create(java.util.function.Function<Buffer,T> decode)` Create a codec that buffers the entire body and then apply the `decode` function and returns the result.
    `BodyCodec` | `getDelegate()`
    `static <U> BodyCodec<U>` | `json(Class<U> type)` Create and return a codec for Java objects encoded using Jackson mapper.
    `static BodyCodec<JsonArray>` | `jsonArray()`
    `static BodyCodec<JsonObject>` | `jsonObject()`
    `static <T> BodyCodec<T>` | `newInstance(BodyCodec arg)`
    `static <T> BodyCodec<T>` | `newInstance(BodyCodec arg, TypeArg<T> __typeArg_T)`
    `static BodyCodec<Void>` | `none()`
    `static BodyCodec<Void>` | `pipe(WriteStream<Buffer> stream)` A body codec that pipes the body to a write stream.
    `static BodyCodec<String>` | `string()`
    `static BodyCodec<String>` | `string(String encoding)` A codec for strings using a specific `encoding`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<BodyCodec> __TYPE_ARG

    - #### __typeArg_0

          public final TypeArg<T> __typeArg_0

  - ### Constructor Detail

    - #### BodyCodec

          public BodyCodec(BodyCodec delegate)

    - #### BodyCodec

          public BodyCodec(BodyCodec delegate,
                           TypeArg<T> typeArg_0)

  - ### Method Detail

    - #### getDelegate

          public BodyCodec getDelegate()

    - #### string

          public static BodyCodec<String> string()

      Returns:
        the UTF-8 string codec

    - #### string

          public static BodyCodec<String> string(String encoding)

      A codec for strings using a specific `encoding`.
      Parameters:
        `encoding` - the encoding
      Returns:
        the codec

    - #### buffer

          public static BodyCodec<Buffer> buffer()

      Returns:
        the codec

    - #### jsonObject

          public static BodyCodec<JsonObject> jsonObject()

      Returns:
        the codec

    - #### jsonArray

          public static BodyCodec<JsonArray> jsonArray()

      Returns:
        the codec

    - #### json

          public static <U> BodyCodec<U> json(Class<U> type)

      Create and return a codec for Java objects encoded using Jackson mapper.
      Parameters:
        `type` -
      Returns:
        a codec for mapping POJO to Json

    - #### none

          public static BodyCodec<Void> none()

      Returns:
        a codec that simply discards the response

    - #### create

          public static <T> BodyCodec<T> create(java.util.function.Function<Buffer,T> decode)

      Create a codec that buffers the entire body and then apply the `decode` function and returns the result.
      Parameters:
        `decode` - the decode function
      Returns:
        the created codec

    - #### pipe

          public static BodyCodec<Void> pipe(WriteStream<Buffer> stream)

      A body codec that pipes the body to a write stream.
      Parameters:
        `stream` - the destination tream
      Returns:
        the body codec for a write stream

    - #### newInstance

          public static <T> BodyCodec<T> newInstance(BodyCodec arg)

    - #### newInstance

          public static <T> BodyCodec<T> newInstance(BodyCodec arg,
                                                     TypeArg<T> __typeArg_T)

Copyright © 2017. All rights reserved.