nsIByteArrayInputStream not scriptable

RESOLVED INCOMPLETE

Status

()

Core
XPCOM
RESOLVED INCOMPLETE
13 years ago
5 years ago

People

(Reporter: Biesinger, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

It would be nice to be able to create an input stream from a byte array in JS;
but
http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsIByteArrayInputStream.idl#41
is only useful from C++.

Comment 1

13 years ago
nsIByteArrayInputStream is redundant.  I have wanted to remove it for some time.
 nsIStringInputStream is a fine replacement for C++ consumers, but it also has
problems for JS consumers.  It might make sense to use nsIStorageStream in
conjunction with nsIBinaryOutputStream or something like that.
could nsIStringInputStream get methods like:

  void setData([const,array,size_is(length)]in octet data, in unsigned long length);
  void setStringAsUTF8(in AString string);

which would make it a lot more useful from js? storage stream is a bit more
complex, since you need to write your data to an outputstream first, and writing
binary data to output streams requires wrapping an nsIBinaryOutputStream around
it too.
QA Contact: xpcom

Comment 3

10 years ago
mass reassigning to nobody.
Assignee: dougt → nobody

Comment 4

5 years ago
This file and interface doesn't appear to exist any more.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.