private void writeCentralDirectoryEnd(long cdLength, long cdOffset) throws IOException {
    writeOut(EOCD_SIG);

    // disk numbers
    writeOutShort(0);
    writeOutShort(0);

    // number of entries
    final int entiresCount = myFile.getEntries().size();
    writeOutShort(entiresCount);
    writeOutShort(entiresCount);

    // length and location of CD
    writeOutLong(cdLength);
    writeOutLong(cdOffset);

    // ZIP file comment
    byte[] data = getBytes(comment);
    writeOutShort(data.length);
    writeOut(data);
  }
private void writeCentralDirectoryEnd(long cdLength, long cdOffset)