Class GzipCompressingEntity
- java.lang.Object
-
- org.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
- org.apache.hc.client5.http.entity.GzipCompressingEntity
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hc.core5.http.EntityDetails,org.apache.hc.core5.http.HttpEntity
public class GzipCompressingEntity extends org.apache.hc.core5.http.io.entity.HttpEntityWrapperWrapping entity that compresses content whenwriting.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringGZIP_CODEC
-
Constructor Summary
Constructors Constructor Description GzipCompressingEntity(org.apache.hc.core5.http.HttpEntity entity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetContent()java.lang.StringgetContentEncoding()longgetContentLength()booleanisChunked()voidwriteTo(java.io.OutputStream outStream)
-
-
-
Field Detail
-
GZIP_CODEC
private static final java.lang.String GZIP_CODEC
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContentEncoding
public java.lang.String getContentEncoding()
- Specified by:
getContentEncodingin interfaceorg.apache.hc.core5.http.EntityDetails- Overrides:
getContentEncodingin classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.hc.core5.http.EntityDetails- Overrides:
getContentLengthin classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
isChunked
public boolean isChunked()
- Specified by:
isChunkedin interfaceorg.apache.hc.core5.http.EntityDetails- Overrides:
isChunkedin classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
getContent
public java.io.InputStream getContent() throws java.io.IOException- Specified by:
getContentin interfaceorg.apache.hc.core5.http.HttpEntity- Overrides:
getContentin classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper- Throws:
java.io.IOException
-
writeTo
public void writeTo(java.io.OutputStream outStream) throws java.io.IOException- Specified by:
writeToin interfaceorg.apache.hc.core5.http.HttpEntity- Overrides:
writeToin classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper- Throws:
java.io.IOException
-
-