Sets this to have actions pending.
If the pending flag is already set or this is closed, it will return false and set throws.
a OutputStream.
true if pending was previously unset and is now set.