org.apache.http.nio.entity
Class NHttpEntityWrapper
java.lang.Object
org.apache.http.entity.HttpEntityWrapper
org.apache.http.nio.entity.NHttpEntityWrapper
- All Implemented Interfaces:
- org.apache.http.HttpEntity, ProducingNHttpEntity
public class NHttpEntityWrapper
- extends org.apache.http.entity.HttpEntityWrapper
- implements ProducingNHttpEntity
| Fields inherited from class org.apache.http.entity.HttpEntityWrapper |
wrappedEntity |
| 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, toString, wait, wait, wait |
| Methods inherited from interface org.apache.http.HttpEntity |
getContentEncoding, getContentLength, getContentType, isChunked, isRepeatable |
NHttpEntityWrapper
public NHttpEntityWrapper(org.apache.http.HttpEntity httpEntity)
throws java.io.IOException
- Throws:
java.io.IOException
getContent
public java.io.InputStream getContent()
throws java.io.IOException,
java.lang.IllegalStateException
- Specified by:
getContent in interface org.apache.http.HttpEntity- Overrides:
getContent in class org.apache.http.entity.HttpEntityWrapper
- Throws:
java.io.IOException
java.lang.IllegalStateException
isStreaming
public boolean isStreaming()
- Specified by:
isStreaming in interface org.apache.http.HttpEntity- Overrides:
isStreaming in class org.apache.http.entity.HttpEntityWrapper
writeTo
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
- Specified by:
writeTo in interface org.apache.http.HttpEntity- Overrides:
writeTo in class org.apache.http.entity.HttpEntityWrapper
- Throws:
java.io.IOException
consumeContent
public void consumeContent()
throws java.io.IOException,
java.lang.UnsupportedOperationException
- Specified by:
consumeContent in interface org.apache.http.HttpEntity- Overrides:
consumeContent in class org.apache.http.entity.HttpEntityWrapper
- Throws:
java.io.IOException
java.lang.UnsupportedOperationException
produceContent
public void produceContent(ContentEncoder encoder,
IOControl ioctrl)
throws java.io.IOException
- Description copied from interface:
ProducingNHttpEntity
- 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.
- Specified by:
produceContent in interface ProducingNHttpEntity
- Throws:
java.io.IOException
finish
public void finish()
- Description copied from interface:
ProducingNHttpEntity
- Notification that any resources allocated for writing can be released.
- Specified by:
finish in interface ProducingNHttpEntity
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.