Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3750] Change Ti.Stream.createStream() to take a 'mode'

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-05-13T17:15:43.000+0000
Affected Version/sSprint 2011-17
Fix Version/sRelease 1.7.0, Sprint 2011-17
ComponentsiOS
Labelsti.stream
ReporterStephen Tramer
AssigneeStephen Tramer
Created2011-04-26T17:57:09.000+0000
Updated2011-05-13T17:15:43.000+0000

Description

General agreement is that the stream spec was incomplete wrt BufferStream and BlobStream. In particular, they should take a mode which specifies whether they are 'read', 'write', or 'append'. In particular: - 'Ti.Stream.MODE_READ' should read from the current position - 'Ti.Stream.MODE_WRITE' should write to the current position - 'Ti.Stream.MODE_APPEND' should append to end of data - 'Ti.Stream.createBuffer()' now takes a box object, with keys 'source' (data source) and 'mode' (mode). Both are required. -- Data streams created from Blobs can only be MODE_READ -- Data streams cannot have mixed modes (i.e. no MODE_READ | MODE_WRITE)

Comments

  1. Stephen Tramer 2011-04-27

    Resolved by 3e7e251.
  2. Jacob Relkin 2011-05-13

    Stream drillbit tests pass - in the basicBufferStream test, we call Ti.Stream.createStream, passing in a mode, thereby verifying this fix.

JSON Source