Package org.gudy.azureus2.core3.torrent

Examples of org.gudy.azureus2.core3.torrent.TOTorrentCreator


                   
                      throws Exception
                    {
                      log( " - generating torrent: " + Debug.getCompressedStackTrace());
                     
                      TOTorrentCreator creator =
                        TOTorrentFactory.createFromFileOrDirWithFixedPieceLength(
                            data_location,
                            announce_url,
                            256*1024 );
                 
                      TOTorrent t = creator.create();
                     
                      t.setHashOverride( hash );
                     
                      return( t );
                    }
View Full Code Here


           
            try{
           
              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

    out.println("Torrent Filename: " + dm.getTorrentFileName());
    out.println("Saving to: " + dm.getSaveLocation());
    out.println("Created By: " + dm.getTorrentCreatedBy());
    out.println("Comment: " + dm.getTorrentComment());
    out.println("- Tracker Info -");
    TRTrackerAnnouncer trackerclient = dm.getTrackerClient();
    if (trackerclient != null) {
      out.println("URL: " + trackerclient.getTrackerURL());
      String timestr;
      try {
        int time = trackerclient.getTimeUntilNextUpdate();
        if (time < 0) {
          timestr = MessageText.getString("GeneralView.label.updatein.querying");
        } else {
          int minutes = time / 60;
          int seconds = time % 60;
          String strSeconds = "" + seconds;
          if (seconds < 10) {
            strSeconds = "0" + seconds; //$NON-NLS-1$
          }
          timestr = minutes + ":" + strSeconds;
        }
      } catch (Exception e) {
        timestr = "unknown";
      }
      out.println("Time till next Update: " + timestr);
      out.println("Status: " + trackerclient.getStatusString());
    } else
      out.println("  Not available");
   
    out.println("- Files Info -");
    DiskManagerFileInfo files[] = dm.getDiskManagerFileInfo();
View Full Code Here

          return "";
        return "(max " + DisplayFormatters.formatByteCountToKiBEtcPerSec(uploadSpeed) + ")";
       
      case 'S':
      case 'P':
        TRTrackerScraperResponse hd = dm.getTrackerScrapeResponse();
        if (hd == null || !hd.isValid())
          return "?";
        else
        {
          if( variable == 'S' )
            return Integer.toString(hd.getSeeds());
          else
            return Integer.toString(hd.getPeers());
        }
      default:
        return "??" + variable + "??";
    }
  }
View Full Code Here

  protected boolean performCommand(ConsoleInput ci, DownloadManager dm, List args) {
    TOTorrent torrent = dm.getTorrent();
        if (torrent != null) {
          try {
          TRHost  host = ci.azureus_core.getTrackerHost();
         
          TRHostTorrent  existing = host.getHostTorrent( torrent );
         
          if ( existing == null ){
           
            host.publishTorrent(torrent);
          }else{
            try{
              existing.remove();
             
            }catch( Throwable e ){
View Full Code Here

    TOTorrent torrent = dm.getTorrent();
        if (torrent != null) {
          try {
          TRHost  host = ci.azureus_core.getTrackerHost();
         
          TRHostTorrent  existing = host.getHostTorrent( torrent );
         
          if ( existing == null ){
           
            host.publishTorrent(torrent);
          }else{
            try{
              existing.remove();
             
            }catch( Throwable e ){
             
              e.printStackTrace();
            }
View Full Code Here

    }
   
    final trustDialog[]  dialog = new trustDialog[1];
   
    try{
      Utils.execSWTThread(new AERunnable() {
            public void
            runSupport()
            {
              dialog[0] = new trustDialog( display, resource, cert );
            }
View Full Code Here

      return;
    }
   
    try{
      display.asyncExec(
          new AERunnable()
          {
            public void
            runSupport()
            {
               new createDialog( display );
View Full Code Here

    if (logAlert.details != null) {
      text += "\n<A HREF=\"details\">" + MessageText.getString("v3.MainWindow.button.viewdetails") + "</A>";
    }

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        openWindow();
      }
    });
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.ui.IStartup#earlyStartup()
   */
  public void earlyStartup() {
    final Display display = Display.getDefault();
    display.syncExec(new AERunnable() {
      public void runSupport() {
        hookApplicationMenu(display);
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.torrent.TOTorrentCreator

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.