Package org.asynchttpclient.request.body
Interface RandomAccessBody
-
- All Superinterfaces:
AutoCloseable
,Body
,Closeable
- All Known Implementing Classes:
MultipartBody
public interface RandomAccessBody extends Body
A request body which supports random access to its contents.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.asynchttpclient.request.body.Body
Body.BodyState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
transferTo(WritableByteChannel target)
Transfers the specified chunk of bytes from this body to the specified channel.-
Methods inherited from interface org.asynchttpclient.request.body.Body
getContentLength, transferTo
-
-
-
-
Method Detail
-
transferTo
long transferTo(WritableByteChannel target) throws IOException
Transfers the specified chunk of bytes from this body to the specified channel.- Parameters:
target
- The destination channel to transfer the body chunk to, must not benull
.- Returns:
- The non-negative number of bytes actually transferred.
- Throws:
IOException
- If the body chunk could not be transferred.
-
-