public function flush() {
    if ($this->locked) return;
    while ($this->send()) {
    }
    foreach ($this->files as $file) {
      $this->output($file->getCentral());
    }
    $this->output($this->getEOF());
    $this->locked = TRUE;
    $this->outputter->flush();
  }