Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.contrib.compress
Class GzipCompressingEntity  view GzipCompressingEntity download GzipCompressingEntity.java

java.lang.Object
  extended byorg.apache.http.entity.HttpEntityWrapper
      extended byorg.apache.http.contrib.compress.GzipCompressingEntity
All Implemented Interfaces:
org.apache.http.HttpEntity

public class GzipCompressingEntity
extends org.apache.http.entity.HttpEntityWrapper

+ * Wrapping entity that compresses content when writing 55 . + *

Since:
4.0
Version:
$Revision: 379761 $

Field Summary
private static java.lang.String GZIP_CODEC
           
 
Fields inherited from class org.apache.http.entity.HttpEntityWrapper
wrappedEntity
 
Constructor Summary
GzipCompressingEntity(org.apache.http.HttpEntity entity)
           
 
Method Summary
 org.apache.http.Header getContentEncoding()
          Obtains the Content-Encoding header, if known.
 long getContentLength()
          Tells the length of the content, if known.
 boolean isChunked()
          Tells about chunked encoding for this entity.
 void writeTo(java.io.OutputStream outstream)
          Writes the entity content to the output stream.
 
Methods inherited from class org.apache.http.entity.HttpEntityWrapper
consumeContent, getContent, getContentType, isRepeatable, isStreaming
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GZIP_CODEC

private static final java.lang.String GZIP_CODEC
See Also:
Constant Field Values
Constructor Detail

GzipCompressingEntity

public GzipCompressingEntity(org.apache.http.HttpEntity entity)
Method Detail

getContentEncoding

public org.apache.http.Header getContentEncoding()
Description copied from interface: org.apache.http.HttpEntity
Obtains the Content-Encoding header, if known. This is the header that should be used when sending the entity, or the one that was received with the entity. Wrapping entities that modify the content encoding should adjust this header accordingly.


getContentLength

public long getContentLength()
Description copied from interface: org.apache.http.HttpEntity
Tells the length of the content, if known.


isChunked

public boolean isChunked()
Description copied from interface: org.apache.http.HttpEntity
Tells about chunked encoding for this entity. The primary purpose of this method is to indicate whether chunked encoding should be used when the entity is sent. For entities that are received, it can also indicate whether the entity was received with chunked encoding.
The behavior of wrapping entities is implementation dependent, but should respect the primary purpose.


writeTo

public void writeTo(java.io.OutputStream outstream)
             throws java.io.IOException
Description copied from interface: org.apache.http.HttpEntity
Writes the entity content to the output stream.