Interface Body
-
Method Summary
Modifier and TypeMethodDescriptionstatic Bodystatic BodyCreate 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.stream()Get stream of theBody.
-
Method Details
-
body
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
-
body
-
body
Create a newBodyinstance.- Parameters:
stream- theReadStreamof the body- Returns:
- a reference to this, so the API can be used fluently
-
body
-
body
-
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
-