cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Clelland (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-2406) write binary to disk
Date Tue, 11 Jun 2013 20:17:19 GMT

    [ https://issues.apache.org/jira/browse/CB-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13680622#comment-13680622
] 

Ian Clelland commented on CB-2406:
----------------------------------

I have this working in iOS, with a patch ready for as soon as the git repos come back up.

The general idea in JavaScript is to detect incoming blobs in FileWriter.write(), convert
them to ArrayBuffers, and then use the native capabilities of the bridge to transfer the ArrayBuffer
contents to native code.

The native side (FileUtils|CDVFile).write() method then needs to be updated then to accept
binary data as well as strings, and to save it to disk in that raw format, without performing
any Unicode conversion on it.
                
> write binary to disk
> --------------------
>
>                 Key: CB-2406
>                 URL: https://issues.apache.org/jira/browse/CB-2406
>             Project: Apache Cordova
>          Issue Type: New Feature
>            Reporter: James Campos
>            Assignee: Ian Clelland
>
> i'd like to write binary data to disk. i realize that this may be difficult due to the
native bridge, but it is possible by requiring that the data be hex or base64 encoded, or
by treating javascript strings as arrays of 16 bit integers

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message