public class

ConsumingNHttpEntityTemplate

extends HttpEntityWrapper
implements ConsumingNHttpEntity
java.lang.Object
   ↳ org.apache.http.entity.HttpEntityWrapper
     ↳ org.apache.http.nio.entity.ConsumingNHttpEntityTemplate

Class Overview

A ConsumingNHttpEntity that forwards available content to a ContentListener.

Summary

[Expand]
Inherited Fields
From class org.apache.http.entity.HttpEntityWrapper
Public Constructors
ConsumingNHttpEntityTemplate(HttpEntity httpEntity, ContentListener contentListener)
Public Methods
void consumeContent(ContentDecoder decoder, IOControl ioctrl)
Notification that content is available to be read from the decoder.
void consumeContent()
This method is equivalent to the finish() method.
void finish()
Notification that any resources allocated for reading can be released.
InputStream getContent()
ContentListener getContentListener()
boolean isStreaming()
void writeTo(OutputStream out)
[Expand]
Inherited Methods
From class org.apache.http.entity.HttpEntityWrapper
From class java.lang.Object
From interface org.apache.http.HttpEntity
From interface org.apache.http.nio.entity.ConsumingNHttpEntity

Public Constructors

public ConsumingNHttpEntityTemplate (HttpEntity httpEntity, ContentListener contentListener)

Public Methods

public void consumeContent (ContentDecoder decoder, IOControl ioctrl)

Notification that content is available to be read from the decoder. IOControl instance passed as a parameter to the method can be used to suspend input events if the entity is temporarily unable to allocate more storage to accommodate all incoming content.

Parameters
decoder content decoder.
ioctrl I/O control of the underlying connection.
Throws
IOException

public void consumeContent ()

This method is equivalent to the finish() method.
TODO: The name of this method is misnomer. It will be renamed to #finish() in the next major release.

Throws
IOException

public void finish ()

Notification that any resources allocated for reading can be released.

public ContentListener getContentListener ()

public boolean isStreaming ()

public void writeTo (OutputStream out)