Package io.vertx.httpproxy
Interface Body
-
public interface BodyHandles the HTTP proxy body.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Bodybody(Buffer buffer)static Bodybody(Buffer buffer, MediaType mediaType)Create a newBodyinstance.static Bodybody(ReadStream<Buffer> stream)Create a newBodyinstance.static Bodybody(ReadStream<Buffer> stream, long len)Create a newBodyinstance.static Bodybody(ReadStream<Buffer> stream, long len, MediaType mediatype)static Bodybody(ReadStream<Buffer> stream, long len, String mediatype)longlength()Get length of theBody.StringmediaType()ReadStream<Buffer>stream()Get stream of theBody.
-
-
-
Method Detail
-
body
static Body body(ReadStream<Buffer> stream, long len)
Create a newBodyinstance.- Parameters:
stream- theReadStreamof the bodylen- the determined length of the body- Returns:
- a reference to this, so the API can be used fluently
-
body
static Body body(ReadStream<Buffer> stream, long len, MediaType mediatype)
-
body
static Body body(ReadStream<Buffer> stream, long len, String mediatype)
-
body
static Body body(ReadStream<Buffer> stream)
Create a newBodyinstance.- Parameters:
stream- theReadStreamof the body- Returns:
- a reference to this, so the API can be used fluently
-
body
static Body body(Buffer buffer, MediaType mediaType)
Create a newBodyinstance.- Parameters:
buffer- theBufferof the bodymediaType- the body media type- Returns:
- a reference to this, so the API can be used fluently
-
mediaType
String mediaType()
- Returns:
- the media type of this body
-
length
long length()
Get length of theBody.- Returns:
- the body length or
-1if that can't be determined
-
stream
ReadStream<Buffer> stream()
Get stream of theBody.- Returns:
- the body stream
-
-