Titanium mobile needs support for binary data operations. A new buffer type needs to be created that will be used for read / write operations on streams.
- Buffer - Generally represents temporary storage for data when moving from one location to another (such as reading data off a socket and then writing to a file). In our case, the buffer will be a container for binary data rather than being limited to only string data.
- Create Buffer data type for use with Stream IO
In order to support generic handling of Stream operations, all read / write operations will utilize the new buffer type. Buffer type will allow for array style access for individual bytes (IE: myarray[spe:3] = 1)
Creating buffer object: