public interface HttpEntity
HttpRequest or
HttpResponse.
There are three distinct types of entities, depending on their content:
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Provides the entity's content as bytes.
|
InputStream |
getContent()
Provides the entity's content as a stream.
|
Collection<HttpPart> |
getParts()
Provides the entity's content parts.
|
boolean |
isComposed()
Tells whether or not this entity is composed of several parts, in which case they should be available through
getParts(). |
boolean |
isStreaming()
Tells whether this entity's content is stream based.
|
boolean isStreaming()
true if content is streamed, false otherwisegetContent()boolean isComposed()
getParts().true if there are several content parts, false otherwiseInputStream getContent()
InputStream representing this entity's content or null if such representation is not possiblebyte[] getBytes()
throws IOException
null if such representation is not possibleIOException - if an error occurs creating the byte arrayCollection<HttpPart> getParts() throws IOException
HttpParts representing this entity's content parts, if presentIOException - if an error occurs handling the partsisComposed()Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.