public abstract class AbstractHttpEntity extends Object implements HttpEntity
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpEntity(ContentType contentType,
String contentEncoding) |
protected |
AbstractHttpEntity(ContentType contentType,
String contentEncoding,
boolean chunked) |
protected |
AbstractHttpEntity(String contentType,
String contentEncoding) |
protected |
AbstractHttpEntity(String contentType,
String contentEncoding,
boolean chunked) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentEncoding()
Returns content encoding of the entity, if known.
|
String |
getContentType()
Returns content type of the entity, if known.
|
Set<String> |
getTrailerNames()
Preliminary declaration of trailing headers.
|
Supplier<List<? extends Header>> |
getTrailers()
Returns supplier of message trailers - headers sent after message body.
|
boolean |
isChunked()
Returns chunked transfer hint for this entity.
|
boolean |
isRepeatable()
Tells if the entity is capable of producing its data more than once.
|
String |
toString() |
static void |
writeTo(HttpEntity entity,
OutputStream outStream) |
void |
writeTo(OutputStream outStream)
Writes the entity content out to the output stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetContent, isStreaminggetContentLengthprotected AbstractHttpEntity(String contentType, String contentEncoding, boolean chunked)
protected AbstractHttpEntity(ContentType contentType, String contentEncoding, boolean chunked)
protected AbstractHttpEntity(ContentType contentType, String contentEncoding)
public static void writeTo(HttpEntity entity, OutputStream outStream) throws IOException
IOExceptionpublic void writeTo(OutputStream outStream) throws IOException
HttpEntityIMPORTANT: Please note all entity implementations must ensure that all allocated resources are properly deallocated when this method returns.
writeTo in interface HttpEntityoutStream - the output stream to write entity content toIOException - if an I/O error occurspublic final String getContentType()
EntityDetailsgetContentType in interface EntityDetailspublic final String getContentEncoding()
EntityDetailsgetContentEncoding in interface EntityDetailspublic final boolean isChunked()
EntityDetailsThe behavior of wrapping entities is implementation dependent, but should respect the primary purpose.
isChunked in interface EntityDetailspublic boolean isRepeatable()
HttpEntityisRepeatable in interface HttpEntitypublic Supplier<List<? extends Header>> getTrailers()
HttpEntitynull if trailers are not available.getTrailers in interface HttpEntitypublic Set<String> getTrailerNames()
EntityDetailsgetTrailerNames in interface EntityDetailsCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.