public interface

RandomAccessBody

implements Body
com.ning.http.client.RandomAccessBody
Known Indirect Subclasses

Class Overview

A request body which supports random access to its contents.

Summary

Public Methods
abstract long transferTo(long position, long count, WritableByteChannel target)
Transfers the specified chunk of bytes from this body to the specified channel.
[Expand]
Inherited Methods
From interface com.ning.http.client.Body

Public Methods

public abstract long transferTo (long position, long count, WritableByteChannel target)

Transfers the specified chunk of bytes from this body to the specified channel.

Parameters
position The zero-based byte index from which to start the transfer, must not be negative.
count The maximum number of bytes to transfer, must not be negative.
target The destination channel to transfer the body chunk to, must not be null.
Returns
  • The non-negative number of bytes actually transferred.
Throws
IOException If the body chunk could not be transferred.