public void finish() throws IOException {
    long cdOffset = getWritten();
    final List<JBZipEntry> entries = myFile.getEntries();
    for (JBZipEntry entry : entries) {
      writeCentralFileHeader(entry);
    }
    long cdLength = getWritten() - cdOffset;

    if (myFile.isZip64()) {
      writeZip64CentralDirectory(cdLength, cdOffset);
    }
    writeCentralDirectoryEnd(cdLength, cdOffset);
    flushBuffer();
    def.end();
  }
public void finish()