public function stream_close()
    {
        self::restore();
        if ($this->fileHandle !== null) {
            fclose($this->fileHandle);
            $this->fileHandle = null;
        }
        self::register();
    }