Class SimpleAsyncEntityConsumer

  • All Implemented Interfaces:
    org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.AsyncEntityConsumer<byte[]>, org.apache.hc.core5.http.nio.ResourceHolder

    final class SimpleAsyncEntityConsumer
    extends org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer<byte[]>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.hc.core5.util.ByteArrayBuffer buffer  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int capacityIncrement()  
      protected void data​(java.nio.ByteBuffer src, boolean endOfStream)  
      protected byte[] generateContent()  
      void releaseResources()  
      protected void streamStart​(org.apache.hc.core5.http.ContentType contentType)  
      • Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer

        completed, failed, getContent, streamStart
      • Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer

        consume, streamEnd, updateCapacity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer

        consume, streamEnd, updateCapacity
    • Field Detail

      • buffer

        private final org.apache.hc.core5.util.ByteArrayBuffer buffer
    • Constructor Detail

      • SimpleAsyncEntityConsumer

        public SimpleAsyncEntityConsumer()
    • Method Detail

      • streamStart

        protected void streamStart​(org.apache.hc.core5.http.ContentType contentType)
                            throws org.apache.hc.core5.http.HttpException,
                                   java.io.IOException
        Specified by:
        streamStart in class org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer<byte[]>
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException
      • capacityIncrement

        protected int capacityIncrement()
        Specified by:
        capacityIncrement in class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
      • data

        protected void data​(java.nio.ByteBuffer src,
                            boolean endOfStream)
                     throws java.io.IOException
        Specified by:
        data in class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
        Throws:
        java.io.IOException
      • generateContent

        protected byte[] generateContent()
                                  throws java.io.IOException
        Specified by:
        generateContent in class org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer<byte[]>
        Throws:
        java.io.IOException
      • releaseResources

        public void releaseResources()