Class BufferedByteConsumer
java.lang.Object
org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
co.elastic.clients.transport.rest5_client.low_level.BufferedByteConsumer
- All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer,org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>,org.apache.hc.core5.http.nio.ResourceHolder
public class BufferedByteConsumer
extends org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
implements org.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected final voidprotected voiddata(ByteBuffer src, boolean endOfStream) final voidorg.apache.hc.core5.http.io.entity.ByteArrayEntityvoidvoidstreamStart(org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.io.entity.ByteArrayEntity> resultCallback) Methods inherited from class org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
consume, streamEnd, updateCapacityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer
consume, streamEnd, updateCapacity
-
Constructor Details
-
BufferedByteConsumer
public BufferedByteConsumer(int bufferLimit)
-
-
Method Details
-
streamStart
public void streamStart(org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.http.io.entity.ByteArrayEntity> resultCallback) - Specified by:
streamStartin interfaceorg.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
-
capacityIncrement
protected int capacityIncrement()- Specified by:
capacityIncrementin classorg.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer
-
data
protected void data(ByteBuffer src, boolean endOfStream) throws org.apache.hc.core5.http.ContentTooLongException - Specified by:
datain classorg.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer- Throws:
org.apache.hc.core5.http.ContentTooLongException
-
completed
- Specified by:
completedin classorg.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer- Throws:
IOException
-
getContent
public org.apache.hc.core5.http.io.entity.ByteArrayEntity getContent()- Specified by:
getContentin interfaceorg.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
-
failed
- Specified by:
failedin interfaceorg.apache.hc.core5.http.nio.AsyncEntityConsumer<org.apache.hc.core5.http.io.entity.ByteArrayEntity>
-
releaseResources
public void releaseResources()- Specified by:
releaseResourcesin interfaceorg.apache.hc.core5.http.nio.ResourceHolder
-