org.openrdf.http.object.model
Class ConsumingHttpEntity

java.lang.Object
  extended by org.apache.http.entity.HttpEntityWrapper
      extended by org.apache.http.nio.entity.ConsumingNHttpEntityTemplate
          extended by org.openrdf.http.object.model.ConsumingHttpEntity
All Implemented Interfaces:
org.apache.http.HttpEntity, org.apache.http.nio.entity.ConsumingNHttpEntity, org.apache.http.nio.entity.ProducingNHttpEntity

public class ConsumingHttpEntity
extends org.apache.http.nio.entity.ConsumingNHttpEntityTemplate
implements org.apache.http.nio.entity.ProducingNHttpEntity

Redirects read operations to a ReadableContentListener objects.

Author:
James Leigh

Field Summary
 
Fields inherited from class org.apache.http.entity.HttpEntityWrapper
wrappedEntity
 
Constructor Summary
ConsumingHttpEntity(org.apache.http.HttpEntity httpEntity, ReadableContentListener in)
           
 
Method Summary
 InputStream getContent()
           
 ReadableByteChannel getReadableByteChannel()
           
 boolean isStreaming()
           
 void produceContent(org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl)
           
 String toString()
           
 void writeTo(OutputStream out)
           
 
Methods inherited from class org.apache.http.nio.entity.ConsumingNHttpEntityTemplate
consumeContent, consumeContent, finish, getContentListener
 
Methods inherited from class org.apache.http.entity.HttpEntityWrapper
getContentEncoding, getContentLength, getContentType, isChunked, isRepeatable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.http.nio.entity.ProducingNHttpEntity
finish
 
Methods inherited from interface org.apache.http.HttpEntity
consumeContent, getContentEncoding, getContentLength, getContentType, isChunked, isRepeatable
 

Constructor Detail

ConsumingHttpEntity

public ConsumingHttpEntity(org.apache.http.HttpEntity httpEntity,
                           ReadableContentListener in)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getContent

public InputStream getContent()
                       throws IOException,
                              UnsupportedOperationException
Specified by:
getContent in interface org.apache.http.HttpEntity
Overrides:
getContent in class org.apache.http.nio.entity.ConsumingNHttpEntityTemplate
Throws:
IOException
UnsupportedOperationException

writeTo

public void writeTo(OutputStream out)
             throws IOException,
                    UnsupportedOperationException
Specified by:
writeTo in interface org.apache.http.HttpEntity
Overrides:
writeTo in class org.apache.http.nio.entity.ConsumingNHttpEntityTemplate
Throws:
IOException
UnsupportedOperationException

isStreaming

public boolean isStreaming()
Specified by:
isStreaming in interface org.apache.http.HttpEntity
Overrides:
isStreaming in class org.apache.http.nio.entity.ConsumingNHttpEntityTemplate

getReadableByteChannel

public ReadableByteChannel getReadableByteChannel()
                                           throws IOException
Throws:
IOException

produceContent

public void produceContent(org.apache.http.nio.ContentEncoder encoder,
                           org.apache.http.nio.IOControl ioctrl)
                    throws IOException
Specified by:
produceContent in interface org.apache.http.nio.entity.ProducingNHttpEntity
Throws:
IOException


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.