private void deliverWriteCallback(Context cx, Scriptable req, String err)
{
Object onComplete = ScriptableObject.getProperty(req, "oncomplete");
if ((onComplete != null) && !Undefined.instance.equals(onComplete)) {
Function afterWrite = (Function)onComplete;
afterWrite.call(cx, afterWrite, this,
new Object[] { (err == null ? Undefined.instance : err), this, req });
}
}
@Override