Class PushBody
- java.lang.Object
-
- org.asynchttpclient.request.body.generator.PushBody
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Body
public final class PushBody extends Object implements Body
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.asynchttpclient.request.body.Body
Body.BodyState
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetContentLength()Gets the length of the body.Body.BodyStatetransferTo(io.netty.buffer.ByteBuf target)Reads the next chunk of bytes from the body.
-
-
-
Method Detail
-
getContentLength
public long getContentLength()
Description copied from interface:BodyGets the length of the body.- Specified by:
getContentLengthin interfaceBody- Returns:
- The length of the body in bytes, or negative if unknown.
-
transferTo
public Body.BodyState transferTo(io.netty.buffer.ByteBuf target)
Description copied from interface:BodyReads the next chunk of bytes from the body.- Specified by:
transferToin interfaceBody- Parameters:
target- The buffer to store the chunk in, must not benull.- Returns:
- The state.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-