public interface BodyCodec<T>
| 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. | 
void | 
create(Handler<AsyncResult<BodyStream<T>>> handler)
Create the  
BodyStream. | 
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 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. | 
static BodyCodec<String> string(String encoding)
encoding.encoding - the encodingstatic BodyCodec<JsonObject> jsonObject()
JsonObject codecstatic <U> BodyCodec<U> json(Class<U> type)
static <T> BodyCodec<T> create(java.util.function.Function<Buffer,T> decode)
decode function and returns the result.decode - the decode functionstatic BodyCodec<Void> pipe(WriteStream<Buffer> stream)
stream - the destination treamstatic BodyCodec<Void> pipe(WriteStream<Buffer> stream, boolean close)
stream - the destination streamclose - whether the destination stream should be closedvoid create(Handler<AsyncResult<BodyStream<T>>> handler)
BodyStream.
 This method is usually called for creating the pump for the HTTP response and should not be called directly.
Copyright © 2020 Eclipse. All rights reserved.