# PumpCallbackArgs

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

Availability
1.7
1.7
9.2.0
Extends

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Overview

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.

# Properties

# buffer

Availability
1.7
1.7
9.2.0
buffer :Titanium.Buffer

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


# bytesProcessed

Availability
1.7
1.7
9.2.0
bytesProcessed :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

Availability
3.1.0
3.1.0
9.2.0
code :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

Availability
3.1.0
3.1.0
9.2.0
error :String

Error message, if any returned.

Will be undefined if success is true.


# errorDescription DEPRECATED

Availability
1.7
1.7
errorDescription :String

DEPRECATED SINCE 3.1.0

Use error property to determine error message

Text description of the error.


# errorState DEPRECATED

Availability
1.7
errorState :Number

DEPRECATED SINCE 3.1.0

Use success or code values to determine error conditions

Whether an error was encountered. Set to 1 in the case of an error, 0 otherwise.


# source

Availability
1.7
1.7
9.2.0

Stream being read from.


# success

Availability
3.1.0
3.1.0
9.2.0
success :Boolean

Indicates if the operation succeeded.

Returns true if request succeeded, false otherwise.


# totalBytesProcessed

Availability
1.7
1.7
9.2.0
totalBytesProcessed :Number

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