org.apache.http.nio.entity
Interface ProducingNHttpEntity

All Superinterfaces:
HttpEntity
All Known Implementing Classes:
NByteArrayEntity, NFileEntity, NHttpEntityWrapper, NStringEntity

public interface ProducingNHttpEntity
extends HttpEntity

An HttpEntity that writes content to a ContentEncoder.

Author:
Sam Berlin

Method Summary
 void finish()
          Notification that any resources allocated for writing can be released.
 void produceContent(ContentEncoder encoder, IOControl ioctrl)
          Notification that content should be written to the encoder.
 
Methods inherited from interface org.apache.http.HttpEntity
consumeContent, getContent, getContentEncoding, getContentLength, getContentType, isChunked, isRepeatable, isStreaming, writeTo
 

Method Detail

produceContent

void produceContent(ContentEncoder encoder,
                    IOControl ioctrl)
                    throws java.io.IOException
Notification that content should be written to the encoder. When all content is finished, this MUST call ContentEncoder.complete(). Failure to do so could result in the entity never being written.

Throws:
java.io.IOException

finish

void finish()
            throws java.io.IOException
Notification that any resources allocated for writing can be released.

Throws:
java.io.IOException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.