code: protected static ZipEntry newZipEntry(File zipDirectory, File file) {
  
      Assert.notNull(file, "File is required");
  
      ZipEntry zipEntry = new ZipEntry(resolveZipEntryName(zipDirectory, file));
  
      zipEntry.setSize(file.getTotalSpace());
      zipEntry.setTime(file.lastModified());
  
      return zipEntry;
    }
docs: Constructs a new {@link ZipEntry} from the given {@link File}.
  
  @param zipDirectory {@link File} referring to the directory being zipped.
  @param file {@link File} used to construct the new {@link ZipEntry}.
  @return a new {@link ZipEntry} constructed from the given {@link File}.
  @throws IllegalArgumentException if {@link File} is {@literal null}.
  @see #resolveZipEntryName(File, File)
  @see java.util.zip.ZipEntry
  @see java.io.File