public class DecompressingEntity extends HttpEntityWrapper
| Constructor and Description |
|---|
DecompressingEntity(HttpEntity src,
IOFunction<InputStream,InputStream> decoder) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getContent()
Returns the cached decoded stream, creating it once if necessary.
|
String |
getContentEncoding()
Content is no longer encoded
|
long |
getContentLength()
Length is unknown after decompression.
|
void |
writeTo(OutputStream out)
Streams the decoded bytes directly to
out. |
close, getContentType, getTrailerNames, getTrailers, isChunked, isRepeatable, isStreaming, toStringpublic DecompressingEntity(HttpEntity src, IOFunction<InputStream,InputStream> decoder)
public InputStream getContent() throws IOException
getContent in interface HttpEntitygetContent in class HttpEntityWrapperIOExceptionpublic long getContentLength()
getContentLength in interface EntityDetailsgetContentLength in class HttpEntityWrapperpublic String getContentEncoding()
getContentEncoding in interface EntityDetailsgetContentEncoding in class HttpEntityWrapperpublic void writeTo(OutputStream out) throws IOException
out.writeTo in interface HttpEntitywriteTo in class HttpEntityWrapperIOExceptionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.