Examples of Downloader


Examples of org.syncany.operations.Downloader

  public RestoreOperation(Config config, RestoreOperationOptions options) {
    super(config, ACTION_ID);
   
    this.options = options;
    this.localDatabase = new SqlDatabase(config);
    this.downloader = new Downloader(config, transferManager);
  }
View Full Code Here

Examples of org.syncany.operations.Downloader

  public ApplyChangesOperation(Config config, SqlDatabase localDatabase, TransferManager transferManager, MemoryDatabase winnersDatabase, DownOperationResult result) {
    super(config);
   
    this.localDatabase = localDatabase;
    this.downloader = new Downloader(config, transferManager);
    this.winnersDatabase = winnersDatabase;
    this.result = result;
  }
View Full Code Here

Examples of org.syncany.operations.Downloader

      FileVersion fileVersion = localDatabase.getFileVersion(fileHistoryId, version);
      FileContent fileContent = localDatabase.getFileContent(fileVersion.getChecksum(), true);
      Map<ChunkChecksum, MultiChunkId> multiChunks = localDatabase.getMultiChunkIdsByChecksums(fileContent.getChunks());

      TransferManager transferManager = config.getTransferPlugin().createTransferManager(config.getConnection(), config);
      Downloader downloader = new Downloader(config, transferManager);
      Assembler assembler = new Assembler(config, localDatabase);

      downloader.downloadAndDecryptMultiChunks(new HashSet<MultiChunkId>(multiChunks.values()));

      File tempFile = assembler.assembleToCache(fileVersion);
      String tempFileToken = StringUtil.toHex(ObjectId.secureRandomBytes(40));
     
      GetFileFolderResponse fileResponse = new GetFileFolderResponse(concreteRequest.getId(), concreteRequest.getRoot(), tempFileToken);
View Full Code Here

Examples of penny.download.Downloader

    }

    public void go() throws MalformedURLException {
        DownloadSettings ds = new DownloadSettings();
        Downloader downloader = new Downloader(ds);
        downloader.setProcessor(this);
        for (String url : http) {
            class Download extends AbstractDownload {

                Download(URL url) {
                    setUrl(url);
                }
            }
            AbstractDownload d = new Download(new URL(url));
            d.addPropertyChangeListener(this);
            downloader.setDownload(d);
            downloader.download();
            d.removePropertyChangeListener(this);
        }
        for (String url : ftp) {
            class Download extends AbstractDownload {

                Download(URL url) {
                    setUrl(url);
                }
            }
            AbstractDownload d = new Download(new URL(url));
            d.addPropertyChangeListener(this);
            downloader.setDownload(d);
            downloader.download();
            d.removePropertyChangeListener(this);
        }
    }
View Full Code Here

Examples of penny.download.Downloader

                    download.setUrl(new URL(addressBox.getText()));
                    download.addPropertyChangeListener(ConnectionTest.this);
                } catch (MalformedURLException ex) {
                    Logger.getLogger(ConnectionTest.class.getName()).log(Level.SEVERE, null, ex);
                }
                Downloader downloader = new Downloader(new DownloadSettings());
                downloader.setDownload(download);
                downloader.setProcessor(tu);
                downloader.download();
                goButton.setText("Go");
                goButton.setEnabled(true);
            }
        };
        Application.getThread(updater).start();
View Full Code Here

Examples of penny.download.Downloader

    @Override
    public void run() {
        data.init();
        data.setStatus(Status.RUNNING);
        Downloader downloader = new Downloader(settings.getDownloadingModel().getDownloadSettings());
        downloader.setProcessor(processor);
        data.setDownload(data.getNextDownload());
        while (data.getDownload() != null && data.getStatus() == Status.RUNNING) {
            downloader.setDownload(data.getDownload());
            downloader.download();
            data.addComplete(data.getDownload());
            data.setDownload(data.getNextDownload());
        }
        downloader.shutdown();
        data.setDownload(null);
        if (data.getStatus() == Status.RUNNING) {
            data.setStatus(Status.FINISHED);
        }
    }
View Full Code Here

Examples of us.codecraft.webmagic.downloader.Downloader

            @Override
            public Site getSite() {
                return Site.me().setSleepTime(0);
            }
        }).setDownloader(new Downloader() {
            @Override
            public Page download(Request request, Task task) {
                return new Page().setRawText("");
            }
View Full Code Here

Examples of util.Downloader

      in.close();
     
      if(line == null)
        throw new IOException("Could not find flv-Video");
     
      Downloader dl = new Downloader("http://www.youtube.com/get_video?video_id=" + vid + "&t=" + line, recv, lang);
      dl.start();
     
      return;
    }
   
    Runtime rt = Runtime.getRuntime();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.