Re: Serilializing the DOM and passing through nsISocketTransportService.
"Amit Saurav" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
On Jan 18, 2008 12:36 PM, Boris Zbarsky <[email protected]> wrote: > stony_dreams wrote: > > outstream.write(strGlob, strGlob.length); > > outstream.close(); > > Ignoring for the moment that your code will corrupt non-ASCII data, why > exactly > are you ignoring the return value of write()? Please see > < > http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpcom/io/nsIOutputStream.idl&rev=3.12&mark=118#112 > > > which clearly documents what the return value means. Thanks a lot for the info.I just changed the stream type to BLOCKING so it waits until all the data is read by the Java side. Also i use a nsIScriptableUnicodeConverter to convert all the data to UTF-8 so the entire stream is in UTF-8 format. But thanks once again for the help.. > > > For sockets, writing more than the socket can buffer will give you a short > write > and write() will indicate that. In that case, you need to keep writing > until > all the data is written. > > None of which has anything to do with the DOM. > > -Boris > > _______________________________________________ > dev-tech-dom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-dom >