public class BodyCodecImpl<T> extends Object implements BodyCodec<T>
| Modifier and Type | Field and Description |
|---|---|
static BodyCodec<Buffer> |
BUFFER |
static BodyCodec<JsonArray> |
JSON_ARRAY |
static Function<Buffer,JsonArray> |
JSON_ARRAY_DECODER |
static BodyCodec<JsonObject> |
JSON_OBJECT |
static Function<Buffer,JsonObject> |
JSON_OBJECT_DECODER |
static BodyCodec<Void> |
NONE |
static BodyCodec<String> |
STRING |
static Function<Buffer,String> |
UTF8_DECODER |
static Function<Buffer,Void> |
VOID_DECODER |
| Constructor and Description |
|---|
BodyCodecImpl(Function<Buffer,T> decoder) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(Handler<AsyncResult<BodyStream<T>>> handler)
Create the
BodyStream. |
static <T> BodyCodec<T> |
json(Class<T> type) |
static <T> Function<Buffer,T> |
jsonDecoder(Class<T> type) |
static BodyCodecImpl<String> |
string(String encoding)
A codec for strings using a specific
encoding. |
public static final Function<Buffer,JsonObject> JSON_OBJECT_DECODER
public static final BodyCodec<JsonObject> JSON_OBJECT
public static BodyCodecImpl<String> string(String encoding)
BodyCodecencoding.public void create(Handler<AsyncResult<BodyStream<T>>> handler)
BodyCodecBodyStream.
This method is usually called for creating the pump for the HTTP response and should not be called directly.
Copyright © 2020. All rights reserved.