Skip to content

Titanium.Stream.PumpCallbackArgs

Argument passed to the callback each time the pump operation has new data to deliver.

A callback with bytesProcessed set to -1 indicates the end of the pump operation, either because of an error or because the end of the stream has been reached.

Extends: ErrorResponse · Since: 1.7 · Platforms: android, iphone, ipad, macos

Properties #

buffer#

Type: Titanium.Buffer

Buffer object holding the data currently being pumped to the handler method.

bytesProcessed#

Type: Number

Number of bytes being passed to this invocation of the handler, or
-1 in the event of an error or end of stream.

code#

Type: Number

Error code. Returns 0 if success is true.

Error code will be 0 if success is true, nonzero otherwise. If the error
was generated by the operating system, that system's error value is used.
Otherwise, this value will be -1.

error#

Type: String

Error message, if any returned.

Will be undefined if success is true.

source#

Type: Titanium.IOStream

Stream being read from.

success#

Type: Boolean

Indicates if the operation succeeded.

Returns true if request succeeded, false otherwise.

totalBytesProcessed#

Type: Number

Total number of bytes read from the stream so far,
including the data passed to this current invocation of the handler.

Titanium SDK Documentation