CBSConnection.readData Member

Syntax

object.readData(timeout, count);

Arguments

ArgumentSummary
timeout
count

Returns

Remarks

See Also

Source Code

function bc_readdata(timeout, count)
{
if (!this.isConnected)
throw "Not Connected.";
var rv;
if (!("_sInputStream" in this)) {
this._sInputStream = toSInputStream(this._inputStream);
dump("OMG, setting up _sInputStream!\n");
}
try
{
// XPCshell h4x
if (typeof count == "undefined")
count = this._sInputStream.available();
if (this.binaryMode)
rv = this._sInputStream.readBytes(count);
else
rv = this._sInputStream.read(count);
}
catch (ex)
{
dd ("*** Caught " + ex + " while reading.");
this.disconnect();
throw (ex);
}
return rv;
}