Package org.apache.hc.core5.http.impl
Class BasicEntityDetails
- java.lang.Object
-
- org.apache.hc.core5.http.impl.BasicEntityDetails
-
- All Implemented Interfaces:
EntityDetails
public final class BasicEntityDetails extends java.lang.Object implements EntityDetails
Basic HTTP message entity details.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private ContentTypecontentTypeprivate longlen
-
Constructor Summary
Constructors Constructor Description BasicEntityDetails(long len, ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentEncoding()Gets content encoding of this entity, if known.longgetContentLength()Gets length of this entity, if known.java.lang.StringgetContentType()Gets content type of this entity, if known.java.util.Set<java.lang.String>getTrailerNames()Gets the preliminary declaration of trailing headers.booleanisChunked()Tests the chunked transfer hint for this entity.
-
-
-
Field Detail
-
len
private final long len
-
contentType
private final ContentType contentType
-
-
Constructor Detail
-
BasicEntityDetails
public BasicEntityDetails(long len, ContentType contentType)
-
-
Method Detail
-
getContentLength
public long getContentLength()
Description copied from interface:EntityDetailsGets length of this entity, if known.- Specified by:
getContentLengthin interfaceEntityDetails- Returns:
- the length of this entity, may be
0.
-
getContentType
public java.lang.String getContentType()
Description copied from interface:EntityDetailsGets content type of this entity, if known.- Specified by:
getContentTypein interfaceEntityDetails- Returns:
- the content type of this entity, may be
null.
-
getContentEncoding
public java.lang.String getContentEncoding()
Description copied from interface:EntityDetailsGets content encoding of this entity, if known.- Specified by:
getContentEncodingin interfaceEntityDetails- Returns:
- the content encoding of this entity, may be
null.
-
isChunked
public boolean isChunked()
Description copied from interface:EntityDetailsTests the chunked transfer hint for this entity.The behavior of wrapping entities is implementation dependent, but should respect the primary purpose.
- Specified by:
isChunkedin interfaceEntityDetails- Returns:
- the chunked transfer hint for this entity.
-
getTrailerNames
public java.util.Set<java.lang.String> getTrailerNames()
Description copied from interface:EntityDetailsGets the preliminary declaration of trailing headers.- Specified by:
getTrailerNamesin interfaceEntityDetails- Returns:
- the preliminary declaration of trailing headers.
-
-