code: protected Resource getDownloadResource() {
  
          String pathToDownload = (String)m_file.getValue();
  
          if (m_donwloadAll.getValue().booleanValue()) {
              pathToDownload = ZIP_PATH;
              writeZipFile();
          }
  
          final File downloadFile = new File(pathToDownload);
  
          return new StreamResource(new StreamResource.StreamSource() {
  
              private static final long serialVersionUID = -8868657402793427460L;
  
              public InputStream getStream() {
  
                  try {
                      return new FileInputStream(downloadFile);
                  } catch (FileNotFoundException e) {
                      return null;
                  }
  
              }
          }, downloadFile.getName());
      }
docs: Creates log-file resource for download.<p>
  
  @return vaadin resource