On 24 Nov 2005, at 11:58, Christian Biesinger wrote:

I don't really understand why you want an nsIOutputStream... unless your Java API wants one, maybe? It sounds like it will work, but if all you want is a byte[], then why don't you, in AsyncOpen, just read all of the data from the stream into such a byte array, using nsIInputStream::Read or ReadSegments or something?

The file channel code does what it does because it does want to write to a stream eventually (the file output stream). It uses the async stream copier in order not to hang the UI while it writes to the file (don't know how much of an issue that'd be for you...).

I thought of implementing an nsIOutputStream and using the async copier in order to allow the nsIRequest methods of the channel to query the copier while an upload is taking place. I'm not sure where methods these are called from.

_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to