chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joram Barrez <joram.bar...@gmail.com>
Subject Re: Objective-CMIS: base64 input streaming
Date Thu, 28 Feb 2013 09:17:42 GMT
> when a read request is being sent to the new input stream class, the XML
> encapsulation and base64 encoding is done on the fly

I remember I looked around for a streaming base64 implementation, but
couldn't find something ready to use in ios straight away.

Are you using some library or are you keeping some characters in memory
until you have enough to do the encoding (like described eg in
http://stackoverflow.com/questions/7920780/is-it-possible-to-base64-encode-a-file-in-chunks
)?




On Thu, Feb 28, 2013 at 10:03 AM, Peter Schmidt
<peter.schmidt@alfresco.com>wrote:

> Hi all
> just a brief heads-up:
> I am going to submit a change in the way content is being uploaded from the
> device to the server.
> How it works at present:
> * a temporary file is created containing the CMIS XML and base64 encoded
> data.
> * a NSInputStream pointing to the tmp file is created
> * the HTTP request BodyStream property is being set to this tmp input
> stream
>
> The new code will do the following:
> * a new class CMISBase64InputStream is being provided, which inherits from
> NSInputStream. It is being initialised with the original source input
> stream (raw data).
> * the HTTP request BodyStream property is being set to the
> CMISBase64InputStream object.
> * when a read request is being sent to the new input stream class, the XML
> encapsulation and base64 encoding is done on the fly
>
> I tested it in both unit tests and a sample app, and it seems to work.
> Unless there are objections, I will submit the new code by end of play
> tomorrow, Fri 1 March
>
> --
> Kind regards
> Peter
>
> -----------
> *Peter Schmidt*
> *Alfresco Software Ltd.*
> *UK: 07748 185496*
> *Int.: 0044 7748 185496*
> *Skype: pweschmidt*
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message