Utility factory to create
HttpEntitys.- Since:
- 0.12.0
-
Method Summary
Modifier and TypeMethodDescriptionBuilds an emptyHttpEntity.default FeedableHttpEntityfeedable()Builds aFeedableHttpEntity.from(byte[] content) Builds aHttpEntityfrom a byte array.from(InputStream content) Builds aHttpEntityfrom an input stream, without knowledge of the length.from(InputStream content, Long contentLength) Builds aHttpEntityfrom an input stream, with knowledge of the length.Builds aHttpEntityfrom a string.
-
Method Details
-
from
Builds aHttpEntityfrom a byte array.- Parameters:
content- the byte array.- Returns:
- the
HttpEntity
-
from
Builds aHttpEntityfrom a string.- Parameters:
content- the string.- Returns:
- the
HttpEntity
-
from
Builds aHttpEntityfrom an input stream, without knowledge of the length.- Parameters:
content- the input stream.- Returns:
- the
HttpEntity
-
from
Builds aHttpEntityfrom an input stream, with knowledge of the length.- Parameters:
content- the byte array.contentLength- the (known) content length.- Returns:
- the
HttpEntity
-
emptyEntity
HttpEntity emptyEntity()Builds an emptyHttpEntity.- Returns:
- the
HttpEntity
-
feedable
Builds aFeedableHttpEntity.- Returns:
- a new
FeedableHttpEntity. - Since:
- 0.13
-