public abstract class AbstractHttpEntity extends Object implements HttpEntity
| 限定符 | 构造器和说明 |
|---|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 HttpEntityoutStream - the output stream to write entity content toIOException - if an I/O error occurspublic final String getContentType()
EntityDetailsgetContentType 在接口中 EntityDetailspublic final String getContentEncoding()
EntityDetailsgetContentEncoding 在接口中 EntityDetailspublic final boolean isChunked()
EntityDetailsThe behavior of wrapping entities is implementation dependent, but should respect the primary purpose.
isChunked 在接口中 EntityDetailspublic boolean isRepeatable()
HttpEntityisRepeatable 在接口中 HttpEntitypublic Supplier<List<? extends Header>> getTrailers()
HttpEntitynull if trailers are not available.getTrailers 在接口中 HttpEntitypublic Set<String> getTrailerNames()
EntityDetailsgetTrailerNames 在接口中 EntityDetailsCopyright © 2023. All rights reserved.