Class ConsumingNHttpEntityTemplate

    • Constructor Detail

      • ConsumingNHttpEntityTemplate

        public ConsumingNHttpEntityTemplate​(HttpEntity httpEntity,
                                            ContentListener contentListener)
        Deprecated.
    • Method Detail

      • getContentListener

        public ContentListener getContentListener()
        Deprecated.
      • getContent

        public java.io.InputStream getContent()
                                       throws java.io.IOException,
                                              java.lang.UnsupportedOperationException
        Deprecated.
        Description copied from interface: HttpEntity
        Returns a content stream of the entity. Repeatable entities are expected to create a new instance of InputStream for each invocation of this method and therefore can be consumed multiple times. Entities that are not repeatable are expected to return the same InputStream instance and therefore may not be consumed more than once.

        IMPORTANT: Please note all entity implementations must ensure that all allocated resources are properly deallocated after the InputStream.close() method is invoked.

        Specified by:
        getContent in interface HttpEntity
        Overrides:
        getContent in class HttpEntityWrapper
        Returns:
        content stream of the entity.
        Throws:
        java.io.IOException - if the stream could not be created
        java.lang.UnsupportedOperationException - if entity content cannot be represented as InputStream.
        See Also:
        HttpEntity.isRepeatable()
      • isStreaming

        public boolean isStreaming()
        Deprecated.
        Description copied from interface: HttpEntity
        Tells whether this entity depends on an underlying stream. Streamed entities that read data directly from the socket should return true. Self-contained entities should return false. Wrapping entities should delegate this call to the wrapped entity.
        Specified by:
        isStreaming in interface HttpEntity
        Overrides:
        isStreaming in class HttpEntityWrapper
        Returns:
        true if the entity content is streamed, false otherwise
      • writeTo

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException,
                            java.lang.UnsupportedOperationException
        Deprecated.
        Description copied from interface: HttpEntity
        Writes the entity content out to the output stream.

        IMPORTANT: Please note all entity implementations must ensure that all allocated resources are properly deallocated when this method returns.

        Specified by:
        writeTo in interface HttpEntity
        Overrides:
        writeTo in class HttpEntityWrapper
        Parameters:
        out - the output stream to write entity content to
        Throws:
        java.io.IOException - if an I/O error occurs
        java.lang.UnsupportedOperationException
      • consumeContent

        public void consumeContent​(ContentDecoder decoder,
                                   IOControl ioctrl)
                            throws java.io.IOException
        Deprecated.
        Description copied from interface: ConsumingNHttpEntity
        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.
        Specified by:
        consumeContent in interface ConsumingNHttpEntity
        Parameters:
        decoder - content decoder.
        ioctrl - I/O control of the underlying connection.
        Throws:
        java.io.IOException