Liveconnect: java.io.InputStream from javascript string

telega <[email protected]> Sun, 18 Nov 2007 10:29:37 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.java
Organization http://groups.google.com
Message-ID <d99c85ac-7292-4364-abed-5ff36749234b__23162.9667956897$1195410649$gmane$org@f13g2000hsa.googlegroups.com>
Hi

Is it possible to get javascript string (containing binary data) as a
java.io.InputStream descendant?
I tried to do this:
var bytes = new java.lang.String(jsString).getBytes();
var byteIn = new java.io.ByteArrayInput(bytes);
but it works incorrectly.

P.S. And also is ther a way to convert java.io.OuputStream back to
javascript string?

Thanks,
telega