MessageBody.getChunk

Gets a glib.bytes.Bytes containing data from body starting at offset.

The size of the returned chunk is unspecified. You can iterate through the entire body by first calling soup.message_body.MessageBody.getChunk with an offset of 0, and then on each successive call, increment the offset by the length of the previously-returned chunk.

If offset is greater than or equal to the total length of body, then the return value depends on whether or not soup.message_body.MessageBody.complete has been called or not; if it has, then soup.message_body.MessageBody.getChunk will return a 0-length chunk (indicating the end of body). If it has not, then soup.message_body.MessageBody.getChunk will return null (indicating that body may still potentially have more data, but that data is not currently available).

class MessageBody
getChunk
(
long offset
)

Parameters

offset long

an offset

Return Value

Type: glib.bytes.Bytes

a #GBytes