FileDocCategorySizeDatePackage
HttpEntityWrapper.javaAPI DocAndroid 1.5 API3361Wed May 06 22:41:10 BST 2009org.apache.http.entity

HttpEntityWrapper

public class HttpEntityWrapper extends Object implements HttpEntity
Base class for wrapping entities. Keeps a {@link #wrappedEntity wrappedEntity} and delegates all calls to it. Implementations of wrapping entities can derive from this class and need to override only those methods that should not be delegated to the wrapped entity.
version
$Revision: 496070 $
since
4.0

Fields Summary
protected HttpEntity
wrappedEntity
The wrapped entity.
Constructors Summary
public HttpEntityWrapper(HttpEntity wrapped)
Creates a new entity wrapper.

param
wrapped the entity to wrap

        super();

        if (wrapped == null) {
            throw new IllegalArgumentException
                ("wrapped entity must not be null");
        }
        wrappedEntity = wrapped;

    
Methods Summary
public voidconsumeContent()

        wrappedEntity.consumeContent();
    
public java.io.InputStreamgetContent()

        return wrappedEntity.getContent();
    
public org.apache.http.HeadergetContentEncoding()

        return wrappedEntity.getContentEncoding();
    
public longgetContentLength()

        return wrappedEntity.getContentLength();
    
public org.apache.http.HeadergetContentType()

        return wrappedEntity.getContentType();
    
public booleanisChunked()

        return wrappedEntity.isChunked();
    
public booleanisRepeatable()

        return wrappedEntity.isRepeatable();
    
public booleanisStreaming()

        return wrappedEntity.isStreaming();
    
public voidwriteTo(java.io.OutputStream outstream)

        wrappedEntity.writeTo(outstream);