views:

255

answers:

1
+1  Q: 

NS_ERROR_FAILURE

A: 

Mine seems to work fine with less code. Try replacing your onDataAvailable function code with:

    var binaryInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);
    binaryInputStream.setInputStream(inputStream);
    this.receivedData.push(binaryInputStream.readBytes(count));
Avindra Goolcharan