Christian Biesinger <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
Matthew Wilson wrote:
Does your ODA impl throw an exception? That would have the side-effect of cancelling the channel...I get onStartRequest called, then onDataAvailable with only a chunk
of the document, then onStopRequest.
No exceptions, but looking at it again, I do the following to get a usable string variable containing the received data:
var si = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(); si = si.QueryInterface(Components.interfaces.nsIScriptableInputStream); si.init(aInputStream); this.data += si.read(aCount); si.close();
I had imagined that si.close would just close my newly created
ScriptableInputStream, but presumably it also affects the open
channel. (When I remove that line I can load the wrong document
reliably.
Yup, closing the scriptable input stream is by design meant to close the "wrapped" input stream. You don't need to worry about explicitly closing |si|.
-Darin
_______________________________________________ Mozilla-netlib mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-netlib