Package org.asynchttpclient
Class HttpResponseBodyPart
- java.lang.Object
-
- org.asynchttpclient.HttpResponseBodyPart
-
- Direct Known Subclasses:
EagerResponseBodyPart,LazyResponseBodyPart
public abstract class HttpResponseBodyPart extends Object
A callback class used when an HTTP response body is received.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpResponseBodyPart(boolean last)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract io.netty.buffer.ByteBufgetBodyByteBuf()abstract ByteBuffergetBodyByteBuffer()abstract byte[]getBodyPartBytes()booleanisLast()abstract intlength()
-
-
-
Method Detail
-
length
public abstract int length()
- Returns:
- length of this part in bytes
-
getBodyPartBytes
public abstract byte[] getBodyPartBytes()
- Returns:
- the response body's part bytes received.
-
getBodyByteBuffer
public abstract ByteBuffer getBodyByteBuffer()
- Returns:
- a
ByteBufferthat wraps the actual bytes read from the response's chunk. TheByteBuffer's capacity is equal to the number of bytes available.
-
getBodyByteBuf
public abstract io.netty.buffer.ByteBuf getBodyByteBuf()
- Returns:
- the
ByteBufof the bytes read from the response's chunk. TheByteBuf's capacity is equal to the number of bytes available.
-
isLast
public boolean isLast()
- Returns:
- true if this is the last part.
-
-