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

EntityTemplate

public class EntityTemplate extends AbstractHttpEntity
Entity that delegates the process of content generation to an abstract content producer.
author
Oleg Kalnichevski
version
$Revision: 496070 $
since
4.0

Fields Summary
private final ContentProducer
contentproducer
Constructors Summary
public EntityTemplate(ContentProducer contentproducer)

        super();
        if (contentproducer == null) {
            throw new IllegalArgumentException("Content producer may not be null");
        }
        this.contentproducer = contentproducer; 
    
Methods Summary
public voidconsumeContent()

    
public java.io.InputStreamgetContent()

        throw new UnsupportedOperationException("Entity template does not implement getContent()");
    
public longgetContentLength()

        return -1;
    
public booleanisRepeatable()

        return true;
    
public booleanisStreaming()

        return true;
    
public voidwriteTo(java.io.OutputStream outstream)

        if (outstream == null) {
            throw new IllegalArgumentException("Output stream may not be null");
        }
        this.contentproducer.writeTo(outstream);