@Override
 public void fireDownload(DownloadInfo downloadData) {
   if (downloadData != null) {
     fireWindowDownload(
         downloadData.getBase64Data(),
         downloadData.getFilename(),
         Base64Utils.getMimeTypeFromBase64Data(downloadData.getBase64Data()));
   }
 }
Exemplo n.º 2
0
  /** 更改数据,根据指定id更改 */
  public synchronized void update(DownloadInfo info) {
    open();
    ContentValues initialValues = new ContentValues();
    initialValues.put(ID, info.getId());
    initialValues.put(NAME, info.getFilename());
    initialValues.put(LOCAL_NAME, info.getLocalname());
    initialValues.put(URL, info.getUrl());
    initialValues.put(FILE_SIZE, info.getFilesize());
    initialValues.put(COMPLETE_SIZE, info.getCompletesize());

    db.update(DATABASE_TABLE, initialValues, ID + "=" + info.getId(), null);
    close();
  }