Package io.vertx.mutiny.ext.web.codec
Class BodyCodec<T>
- java.lang.Object
-
- io.vertx.mutiny.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 theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<BodyCodec>
__TYPE_ARG
TypeArg<T>
__typeArg_0
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BodyCodec<Buffer>
buffer()
static <T> BodyCodec<T>
create(Function<Buffer,T> decode)
boolean
equals(Object o)
io.vertx.ext.web.codec.BodyCodec
getDelegate()
int
hashCode()
static <U> BodyCodec<U>
json(Class<U> type)
static BodyCodec<io.vertx.core.json.JsonArray>
jsonArray()
static BodyCodec<io.vertx.core.json.JsonObject>
jsonObject()
static BodyCodec<Void>
jsonStream(JsonParser parser)
static <T> BodyCodec<T>
newInstance(io.vertx.ext.web.codec.BodyCodec arg)
static <T> BodyCodec<T>
newInstance(io.vertx.ext.web.codec.BodyCodec arg, TypeArg<T> __typeArg_T)
static BodyCodec<Void>
none()
static BodyCodec<Void>
pipe(WriteStream<Buffer> stream)
static BodyCodec<Void>
pipe(WriteStream<Buffer> stream, boolean close)
static BodyCodec<String>
string()
static BodyCodec<String>
string(String encoding)
String
toString()
-
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.codec.BodyCodec getDelegate()
-
string
public static BodyCodec<String> string(String encoding)
- Parameters:
encoding
- the encoding- Returns:
- the codec
-
jsonObject
public static BodyCodec<io.vertx.core.json.JsonObject> jsonObject()
- Returns:
- the codec
-
jsonArray
public static BodyCodec<io.vertx.core.json.JsonArray> jsonArray()
- Returns:
- the codec
-
json
public static <U> BodyCodec<U> json(Class<U> type)
- Parameters:
type
-- Returns:
- a codec for mapping POJO to Json
-
create
public static <T> BodyCodec<T> create(Function<Buffer,T> decode)
- Parameters:
decode
- the decode function- Returns:
- the created codec
-
pipe
public static BodyCodec<Void> pipe(WriteStream<Buffer> stream)
- Parameters:
stream
- the destination stream- Returns:
- the body codec for a write stream
-
pipe
public static BodyCodec<Void> pipe(WriteStream<Buffer> stream, boolean close)
- Parameters:
stream
- the destination streamclose
- whether the destination stream should be closed- Returns:
- the body codec for a write stream
-
jsonStream
public static BodyCodec<Void> jsonStream(JsonParser parser)
- Parameters:
parser
- the non-null JSON parser to emits the JSON object. The parser must be configured for the stream. Not e that you need to keep a reference on the parser to retrieved the JSON events.- Returns:
- the body codec for a write stream
-
newInstance
public static <T> BodyCodec<T> newInstance(io.vertx.ext.web.codec.BodyCodec arg)
-
-