Skip to content
Titanium SDK
Version13.0.0

You are reading 13.0.0. See this page in 13.4.1.

Titanium.BlobStream

proxyAndroidiPhoneiPadmacOSsince Android 1.7, iPhone 1.7, iPad 1.7, macOS 9.2.0

Extends Titanium.IOStreamTitanium.Proxy

Wrapper around Titanium.Blob that implements the Titanium.IOStream interface.

Use the Titanium.Stream.createStream method to create a BlobStream instance from a Blob.

Properties 3

apiName

Stringsince Android 3.2.0, iPhone 3.2.0, iPad 3.2.0, macOS 9.2.0read-only

Inherited from Titanium.Proxy

The name of the API that this proxy corresponds to.

bubbleParent

Booleansince Android 3.0.0, iPhone 3.0.0, iPad 3.0.0, macOS 9.2.0

Inherited from Titanium.Proxy

Indicates if the proxy will bubble an event to its parent.

Default: true

Methods 9

Inherited from Titanium.Proxy

Adds the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to invoke when the event is fired.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

Inherited from Titanium.Proxy

Fires a synthesized event to any registered listeners.

Parameters
ParametersTypeDescription
nameString

Name of the event.

event?Dictionary

A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Inherited from Titanium.IOStream

Indicates whether this stream is readable.

Returns Boolean

True if stream is readable, false otherwise.

Inherited from Titanium.IOStream

Indicates whether this stream is writable.

Returns Boolean

True if stream is writable, false otherwise.

Inherited from Titanium.IOStream

Reads data from this stream into a buffer.

Parameters
ParametersTypeDescription
bufferTitanium.Buffer

Buffer to read stream data into.

offset?Number

Offset into the buffer to start writing stream data. If specified, length must also be specified.

length?Number

Maximum number of bytes to read. If specified, offset must also be specified.

resultsCallback?Callback<ReadCallbackArgs>

Function to call with the results of the read operation.

Returns Number

Number of bytes read.

Inherited from Titanium.Proxy

Removes the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to remove. Must be the same function passed to addEventListener.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

Inherited from Titanium.IOStream

Writes data from a buffer to this stream.

Parameters
ParametersTypeDescription
bufferTitanium.Buffer

Buffer to write to this stream.

offset?Number

Offset in the buffer of the first byte to write to the stream. If specified, length must also be specified.

length?Number

Maximum number of bytes to write to the stream. If specified, offset must also be specified.

resultsCallback?Callback<WriteCallbackArgs>

Function to call with the results of the write operation.

Returns Number

Number of bytes written.