rem: convStream.close(); 
context:             onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail)            {                // All events are returned. Now set up a channel and a                // streamloader to upload.                // Will call onStopRequest when finised.                var icsStr = calComp.serializeToICS();                var ioService = Components.classes["@mozilla.org/network/io-service;1"]                                          .getService(Components.interfaces.nsIIOService);                var channel = ioService.newChannelFromURI(fixupUri(savedthis.mUri));                channel.notificationCallbacks = savedthis;                var uploadChannel = channel.QueryInterface(Components.interfaces.nsIUploadChannel);                // Create a pipe stream to convert the outputstream of the                // unicode converter to the inputstream the uploadchannel                // wants.                var pipe = Components.classes["@mozilla.org/pipe;1"]                                              .createInstance(Components.interfaces.nsIPipe);                const PR_UINT32_MAX = 4294967295; // signals "infinite-length"                pipe.init(true, true, 0, PR_UINT32_MAX, null)                // This converter is needed to convert the javascript unicode                 // string to an array of bytes. (The interface of nsIOutputStream                // uses |string|, but the comments talk about bytes, not                // chars.)                var convStream = Components.classes["@mozilla.org/intl/converter-output-stream;1"]                                           .createInstance(Components.interfaces.nsIConverterOutputStream);                convStream.init(pipe.outputStream, 'UTF-8', 0, 0x0000);                try {                    if (!convStream.writeString(icsStr)) {                        this.mObserver.onError(NS_ERROR_FAILURE,                                                "Error uploading ICS file");                    }                } catch(e) {                    this.mObserver.onError(e.result, e.toString());                }                convStream.close();                uploadChannel.setUploadStream(pipe.inputStream,                                              "text/calendar", -1);                channel.asyncOpen(savedthis, savedthis);            },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/be63c93879986efc534a0e3dd58c4a371e8a7757/calICSCalendar.js/buggy/calendar/providers/ics/calICSCalendar.js