public function readFromResource($descriptor, $close = true)
    {
        if (isset($this->_pipes[$descriptor])) {
            $contents = stream_get_contents($this->_pipes[$descriptor]);
            if ($close) {
                $this->closeResource($descriptor);
            }
            return $contents;
        }
        return false;
    }