public void finish() throws IOException {
  long cdOffset=written;
  final List<JBZipEntry> entries=myFile.getEntries();
  for (int i=0, entriesSize=entries.size(); i < entriesSize; i++) {
    writeCentralFileHeader(entries.get(i));
  }
  long cdLength=written - cdOffset;
  writeCentralDirectoryEnd(cdLength,cdOffset);
  flushBuffer();
}

public void finish ( ) throws IOException { long cdOffset = written ; final List < JBZipEntry > entries = myFile . getEntries ( ) ; for ( int i = 0 , entriesSize = entries . size ( ) ; i < entriesSize ; i ++ ) { writeCentralFileHeader ( entries . get ( i ) ) ; } long cdLength = written - cdOffset ; writeCentralDirectoryEnd ( cdLength , cdOffset ) ; flushBuffer ( ) ; }
finishs writing the contents and closes this as well as the underlying stream .
