Package com.aelitis.azureus.core.vuzefile

Examples of com.aelitis.azureus.core.vuzefile.VuzeFileHandler


            String path = TorrentOpener.setFilterPathData(dialog.open());

            if (path != null) {

              VuzeFileHandler vfh = VuzeFileHandler.getSingleton();

              if (vfh.loadAndHandleVuzeFile(path,
                  VuzeFileComponent.COMP_TYPE_NONE) == null) {

                TorrentOpener.openTorrent(path);
              }
            }
View Full Code Here


      // Use torrent in wherever it is and hope for the best
      // XXX Should error instead?
      torrentFile = new File(sFileName);
    }

    VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
   
    VuzeFile vf = vfh.loadVuzeFile( torrentFile );
   
    if ( vf != null ){
     
        vfh.handleFiles( new VuzeFile[]{ vf }, VuzeFileComponent.COMP_TYPE_NONE );

        return null;
    }
   
    // Do a quick check to see if it's a torrent
View Full Code Here

            public void
            run()
            {
              String filename = source.getAbsolutePath();
             
              VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
             
              if ( vfh.loadAndHandleVuzeFile( filename, VuzeFileComponent.COMP_TYPE_NONE ) != null ){
               
                return;
              }
             
             
View Full Code Here

  {
        // this is a good place to trim out any .vuze files
   
      if ( torrents != null && torrents.length > 0 ){
       
        VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
       
        List  non_vuze_files   = new ArrayList();
        List  vuze_files    = new ArrayList();
       
        for (int i=0;i<torrents.length;i++){
         
          String  torrent = torrents[i];
         
          try{     
            VuzeFile vf = vfh.loadVuzeFile( torrent );

            if ( vf == null ){
             
              non_vuze_files.add( torrent );
             
            }else{
             
              vuze_files.add( vf );
            }
          }catch( Throwable e ){
           
            Debug.printStackTrace(e);
           
            non_vuze_files.add( torrent );
          }
        }
       
        if ( vuze_files.size() > 0 ){
         
          VuzeFile[]  vfs = new VuzeFile[vuze_files.size()];
         
          vuze_files.toArray( vfs );
         
          vfh.handleFiles( vfs, VuzeFileComponent.COMP_TYPE_NONE );
        }
       
        if ( non_vuze_files.size() == 0 && vuze_files.size() > 0 ){
         
          return;
View Full Code Here

           
            String path = TorrentOpener.setFilterPathData( dialog.open());
 
            if ( path != null ){
             
              VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
             
              VuzeFile vf = vfh.loadAndHandleVuzeFile( path, VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE );
             
              if ( vf == null ){
               
                Map params = new HashMap();
                params.put( "error", "invalid .vuze file" );
View Full Code Here

      byte[] data = baos.toByteArray();
     
      if ( vuze_file ){
       
        try{
          VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
         
          VuzeFile vf = vfh.loadVuzeFile( data );
         
          vfh.handleFiles( new VuzeFile[]{ vf }, VuzeFileComponent.COMP_TYPE_NONE );
         
        }catch( Throwable e ){
         
          Debug.out( e );
        }
View Full Code Here

                  headers.put("Cookie", cookies);
                }
               
                ResourceDownloader rd = StaticUtilities.getResourceDownloaderFactory().create( new URL( event_location ));
               
                VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
               
                VuzeFile vf = vfh.loadVuzeFile( rd.download());
               
                if ( vf == null ){
                 
                  event.doit = true;
                  setPageLoading(true, event.location);
                 
                }else{
                 
                  vfh.handleFiles( new VuzeFile[]{ vf }, 0 );
                }
              }catch( Throwable e ){
               
                e.printStackTrace();
              }
View Full Code Here

       
      }else{
       
        byte[] bytes = Base32.decode( content );
       
        VuzeFileHandler vfh = VuzeFileHandler.getSingleton();
       
        VuzeFile vf = vfh.loadVuzeFile( bytes );
       
        if ( vf == null ){
         
          throw new IllegalArgumentException( "content invalid" );
         
        }else{
         
          vfh.handleFiles( new VuzeFile[]{ vf }, 0 );
        }
      }
    }else if (OP_INSTALL_TRIAL.equals(opid)) {
      FeatureManagerUI.createTrial();
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.vuzefile.VuzeFileHandler

Copyright © 2018 www.massapicom. 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.