protected class

InputStreamBodyGenerator.ISBody

extends Object
implements Body
java.lang.Object
   ↳ com.ning.http.client.generators.InputStreamBodyGenerator.ISBody

Summary

Protected Constructors
InputStreamBodyGenerator.ISBody()
Public Methods
void close()
Releases any resources associated with this body.
long getContentLength()
Gets the length of the body.
long read(ByteBuffer buffer)
Reads the next chunk of bytes from the body.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.Body

Protected Constructors

protected InputStreamBodyGenerator.ISBody ()

Public Methods

public void close ()

Releases any resources associated with this body.

Throws
IOException

public long getContentLength ()

Gets the length of the body.

Returns
  • The length of the body in bytes, or negative if unknown.

public long read (ByteBuffer buffer)

Reads the next chunk of bytes from the body.

Parameters
buffer The buffer to store the chunk in, must not be null.
Returns
  • The non-negative number of bytes actually read or -1 if the body has been read completely.
Throws
IOException