public class BodyCodec<T> extends Object
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<BodyCodec> |
__TYPE_ARG |
TypeArg<T> |
__typeArg_0 |
Constructor and Description |
---|
BodyCodec(io.vertx.ext.web.codec.BodyCodec delegate) |
BodyCodec(Object delegate,
TypeArg<T> typeArg_0) |
Modifier and Type | Method and Description |
---|---|
static BodyCodec<Buffer> |
buffer() |
static <T> BodyCodec<T> |
create(Function<Buffer,T> decode)
Create a codec that buffers the entire body and then apply the
decode function and returns the result. |
boolean |
equals(Object o) |
io.vertx.ext.web.codec.BodyCodec |
getDelegate() |
int |
hashCode() |
static <U> BodyCodec<U> |
json(Class<U> type)
Create and return a codec for Java objects encoded using Jackson mapper.
|
static BodyCodec<io.vertx.core.json.JsonArray> |
jsonArray() |
static BodyCodec<io.vertx.core.json.JsonObject> |
jsonObject() |
static BodyCodec<Void> |
jsonStream(JsonParser parser)
A body codec that parse the response as a JSON stream.
|
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)
A body codec that pipes the body to a write stream.
|
static BodyCodec<Void> |
pipe(WriteStream<Buffer> stream,
boolean close)
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 . |
String |
toString() |
public io.vertx.ext.web.codec.BodyCodec getDelegate()
public static BodyCodec<String> string(String encoding)
encoding
.encoding
- the encodingpublic static BodyCodec<io.vertx.core.json.JsonObject> jsonObject()
public static BodyCodec<io.vertx.core.json.JsonArray> jsonArray()
public static <U> BodyCodec<U> json(Class<U> type)
type
- public static <T> BodyCodec<T> create(Function<Buffer,T> decode)
decode
function and returns the result.decode
- the decode functionpublic static BodyCodec<Void> pipe(WriteStream<Buffer> stream)
stream
- the destination streampublic static BodyCodec<Void> pipe(WriteStream<Buffer> stream, boolean close)
stream
- the destination streamclose
- whether the destination stream should be closedpublic static BodyCodec<Void> jsonStream(JsonParser parser)
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.public static <T> BodyCodec<T> newInstance(io.vertx.ext.web.codec.BodyCodec arg)
Copyright © 2021 Eclipse. All rights reserved.