public function write()
    {
        $lines = array();

        foreach ($this->data as $fetch) {
            $data = array($fetch['url'], $fetch['length'], $fetch['filename']);
            array_push($lines, join(' ', $data) . "\n");
        }

        if (count($lines) == 0) {
            if (file_exists($this->fileName)) {
                unlink($this->fileName);
            }
        } else {
            writeFileText($this->fileName, $this->fileEncoding, join('', $lines));
        }
    }