Examples of download()


Examples of org.apache.sshd.client.ScpClient.download()

        assertFileLength(new File("target/scp/remote/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/remote/out2.txt"), data.length(), 5000);

        new File("target/scp/local/out1.txt").delete();
        new File("target/scp/local/out2.txt").delete();
        scp.download("target/scp/remote/*", "target/scp/local");
        assertFileLength(new File("target/scp/local/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/local/out2.txt"), data.length(), 5000);

        session.close(false).await();
        client.stop();
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

        assertFileLength(new File("target/scp/remote/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/remote/dir/out2.txt"), data.length(), 5000);

        Utils.deleteRecursive(new File("target/scp/local/out1.txt"));
        Utils.deleteRecursive(new File("target/scp/local/dir"));
        scp.download("target/scp/remote/*", "target/scp/local");
        assertFileLength(new File("target/scp/local/out1.txt"), data.length(), 5000);
        assertFalse(new File("target/scp/local/dir/out2.txt").exists());

        Utils.deleteRecursive(new File("target/scp/local/out1.txt"));
        scp.download("target/scp/remote/*", "target/scp/local", ScpClient.Option.Recursive);
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

        scp.download("target/scp/remote/*", "target/scp/local");
        assertFileLength(new File("target/scp/local/out1.txt"), data.length(), 5000);
        assertFalse(new File("target/scp/local/dir/out2.txt").exists());

        Utils.deleteRecursive(new File("target/scp/local/out1.txt"));
        scp.download("target/scp/remote/*", "target/scp/local", ScpClient.Option.Recursive);
        assertFileLength(new File("target/scp/local/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/local/dir/out2.txt"), data.length(), 5000);

        session.close(false).await();
        client.stop();
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

        assertFileLength(new File("target/scp/remote/dir/out2.txt"), data.length(), 5000);
        assertEquals(lastMod, new File("target/scp/remote/dir/out2.txt").lastModified());

        Utils.deleteRecursive(new File("target/scp/local"));
        new File("target/scp/local").mkdirs();
        scp.download("target/scp/remote/*", "target/scp/local", ScpClient.Option.Recursive, ScpClient.Option.PreserveAttributes);
        assertFileLength(new File("target/scp/local/out1.txt"), data.length(), 5000);
        assertEquals(lastMod, new File("target/scp/local/out1.txt").lastModified());
        assertFileLength(new File("target/scp/local/dir/out2.txt"), data.length(), 5000);
        assertEquals(lastMod, new File("target/scp/local/dir/out2.txt").lastModified());

View Full Code Here

Examples of org.earth3d.jearth.draw.tree.GeometryMapTree.download()

        synchronized(sl) {
          sl.notifyAll();
        }
      }
    });
    geometry.download();

    synchronized(sl) {
      sl.wait();
    }
   
View Full Code Here

Examples of org.earth3d.jearth.model.Service.download()

        synchronized(sl) {
          sl.notifyAll();
        }
      }
    });
    service.download();

    synchronized(sl) {
      sl.wait();
    }
View Full Code Here

Examples of org.elasticsearch.common.http.client.HttpDownloadHelper.download()

                pluginFile = new File(environment.pluginsFile(), name + ".zip");
                if (url != null) {
                    URL pluginUrl = new URL(url);
                    System.out.println("Trying " + pluginUrl.toExternalForm() + "...");
                    try {
                        downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out));
                        downloaded = true;
                    } catch (IOException e) {
                        // ignore
                    }
                } else {
View Full Code Here

Examples of org.gudy.azureus2.plugins.torrent.TorrentDownloader.download()

     
      try{
        TorrentDownloader dl =
          plugin_interface.getTorrentManager().getURLDownloader( torrent_url, null, null );
       
        torrent = dl.download( Constants.DEFAULT_ENCODING );
       
      }catch( Throwable e ){

        e.printStackTrace();
       
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader.download()

            // no old dl, download sync now
            Logger.log(new LogEvent(LOGID, "sync Downloading " + file));
            try {
              ResourceDownloader rd = ResourceDownloaderFactoryImpl.getSingleton().create(
                  new URL(file));
              fin = rd.download();
              FileUtil.copyFile(fin, filtersFile);
              setNextAutoDownload(true);
            } catch (ResourceDownloaderException e) {
              return;
            }
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader.download()

        InputStream is=null;
        Map reply = new HashMap();
        try
        {
            is = rd.download();
            reply = BDecoder.decode( new BufferedInputStream(is) );

            //all replys of this type contains a "result"
            Long res = (Long) reply.get("result");
            if(res==null)
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.