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.HttpEntityWrapper
Wrapping entity that compresses content whenwriting
.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
GZIP_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.InputStream
getContent()
java.lang.String
getContentEncoding()
long
getContentLength()
boolean
isChunked()
void
writeTo(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:
getContentEncoding
in interfaceorg.apache.hc.core5.http.EntityDetails
- Overrides:
getContentEncoding
in classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceorg.apache.hc.core5.http.EntityDetails
- Overrides:
getContentLength
in classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
isChunked
public boolean isChunked()
- Specified by:
isChunked
in interfaceorg.apache.hc.core5.http.EntityDetails
- Overrides:
isChunked
in classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
-
getContent
public java.io.InputStream getContent() throws java.io.IOException
- Specified by:
getContent
in interfaceorg.apache.hc.core5.http.HttpEntity
- Overrides:
getContent
in 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:
writeTo
in interfaceorg.apache.hc.core5.http.HttpEntity
- Overrides:
writeTo
in classorg.apache.hc.core5.http.io.entity.HttpEntityWrapper
- Throws:
java.io.IOException
-
-