Package org.gudy.azureus2.ui.swt.plugins

Examples of org.gudy.azureus2.ui.swt.plugins.UISWTParameterContext.create()


    if(pieceSizeStr != null) {
      try {    
        long pieceSize = 1l << Integer.parseInt(pieceSizeStr);
        TOTorrentCreator creator = TOTorrentFactory.createFromFileOrDirWithFixedPieceLength(fSrc,url,pieceSize);
        creator.addListener( this );
        torrent = creator.create();
      }catch(Exception e) {
        e.printStackTrace();
        return;
      }
    } else {
View Full Code Here


      }
    } else {
      try {
        TOTorrentCreator creator = TOTorrentFactory.createFromFileOrDirWithComputedPieceLength(fSrc,url);
        creator.addListener( this );
        torrent = creator.create();
      } catch(Exception e) {
        e.printStackTrace();
        return;
      }
    }
View Full Code Here

                        TOTorrentFactory.createFromFileOrDirWithFixedPieceLength(
                            data_location,
                            announce_url,
                            256*1024 );
                 
                      TOTorrent t = creator.create();
                     
                      t.setHashOverride( hash );
                     
                      return( t );
                    }
View Full Code Here

           
              vf.write( f );
           
              TOTorrentCreator cr = TOTorrentFactory.createFromFileOrDirWithComputedPieceLength( f, new URL( "dht://" ));
             
              TOTorrent temp = cr.create();
             
              Map  vuze_map   = vf.exportToMap();
              Map  torrent_map = temp.serialiseToMap();
             
              torrent_map.putAll( vuze_map );
View Full Code Here

    try{
      ResourceDownloaderFactory rdf = plugin_interface.getUtilities().getResourceDownloaderFactory();
   
      URL sl_url = new URL( SECONDARY_LOOKUP + "magnetLookup?hash=" + Base32.encode( hash ) + (args.length()==0?"":("&args=" + UrlUtils.encode( args ))));
     
      ResourceDownloader rd = rdf.create( sl_url );
     
      rd.addListener(
        new ResourceDownloaderAdapter()
        {
          public boolean
View Full Code Here

  private static byte[] downloadURL(URL url, String postData)
      throws Exception {
    ResourceDownloaderFactory rdf = StaticUtilities.getResourceDownloaderFactory();

    ResourceDownloader rd = rdf.create(url, postData);

    rd.setProperty( "URL_Connection", "Keep-Alive" );
   
    rd = rdf.getRetryDownloader(rd, 3);
    // We could report percentage to listeners, but there's no need to atm
View Full Code Here

       
        post_params = post_params.substring( sep+1 );
       
          // already URL encoded
       
        initial_url_rd = rdf.create( initial_url, post_params );

        initial_url_rd.setProperty( "URL_Content-Type", "application/x-www-form-urlencoded" );
       
      }else{
     
View Full Code Here

     
        debugLog( "search_url: " + searchURL );
     
        initial_url = new URL(searchURL);
     
        initial_url_rd = rdf.create( initial_url );
      }
     
      setHeaders( initial_url_rd, headers );
       
      if ( needsAuth && local_cookies != null ){
View Full Code Here

                  URL url = new URL(dl);
                                   
                  ResourceDownloaderFactory rdf = StaticUtilities.getResourceDownloaderFactory();
                 
                  ResourceDownloader url_rd = rdf.create( url );
                     
                  String referer = use_ref?subs.getReferer():null;
                 
                  UrlUtils.setBrowserHeaders( url_rd, referer );
                 
View Full Code Here

    log( "Engine " + engine.getName() + ": auto-update check via " + update_url );
   
    try{
      ResourceDownloaderFactory rdf = StaticUtilities.getResourceDownloaderFactory();
     
      ResourceDownloader url_rd = rdf.create( new URL( update_url ));
     
      ResourceDownloader rd = rdf.getMetaRefreshDownloader( url_rd );
     
      InputStream is = rd.download();
     
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.