Package org.gudy.azureus2.pluginsimpl.local.torrent

Examples of org.gudy.azureus2.pluginsimpl.local.torrent.TorrentImpl


  }
 
  public IPFilter
  getIPFilter()
  {
    return( new IPFilterImpl());
  }
View Full Code Here


 
  public Logger getLogger()
  {
    if ( logger == null ){
     
      logger = new LoggerImpl( this );
    }
   
    return( logger );
  }
View Full Code Here

    else {
      plug_msg = new MessageAdapter( message )//core created
    }
   
    RawMessage raw_plug = plug_encoder.encodeMessage( plug_msg );
    return new com.aelitis.azureus.core.networkmanager.RawMessage[]{ new RawMessageAdapter( raw_plug )};
  }
View Full Code Here

     
      for (int i=0;i<downloads.size();i++){
       
        Download  dl = (Download)downloads.get(i);
       
        TorrentImpl  t = (TorrentImpl)dl.getTorrent();
       
          // can be null if broken torrent
       
        if ( t == null ){
         
          continue;
        }
       
        if ( t.getTorrent().hasSameHashAs( torrent )){
         
          return( dl );
        }
      }
    }
View Full Code Here

 
  public Download
  getDownload(
    Torrent    _torrent )
  {
    TorrentImpl  torrent = (TorrentImpl)_torrent;
   
    try{
      return( getDownload( torrent.getTorrent()));
     
    }catch( DownloadException e ){
    }
   
    return( null );
View Full Code Here

    throws ShareException
  {
    try{
      TOTorrent torrent = TOTorrentFactory.deserialiseFromBEncodedFile( getTorrentFile(item ));
     
      item.setTorrent(new TorrentImpl(torrent));
     
    }catch( TOTorrentException e ){
     
      throw( new ShareException( "ShareManager: Torrent read fails", e ));
    }
View Full Code Here

{
  public static Torrent
  wrap(
    TOTorrent  t )
  {
    return( new TorrentImpl( t ));
  }
View Full Code Here

    TOTorrent  torrent,
    boolean    for_tracker )
 
    throws ClientIDException
  {
    return( getGenerator().generatePeerID( new TorrentImpl( torrent ), for_tracker ));
  }
View Full Code Here

  }
 
  protected Torrent
  getTorrent()
  {
    return( new TorrentImpl( getTOTorrent( false )));
  }
View Full Code Here

     
        //OK lets start the test.
        try{
            TorrentUtils.setFlag( tot, TorrentUtils.TORRENT_FLAG_LOW_NOISE, true );
           
            Torrent torrent = new TorrentImpl(tot);
            String fileName = torrent.getName();

            sendStageUpdateToListeners(MessageText.getString("SpeedTestWizard.stage.message.preparing"));
             
            //create a blank file of specified size. (using the temporary name.)
            File saveLocation = AETemporaryFileHandler.createTempFile();
            File baseDir = saveLocation.getParentFile();
            File blankFile = new File(baseDir,fileName);
            File blankTorrentFile = new File( baseDir, "speedTestTorrent.torrent" );
            torrent.writeToFile(blankTorrentFile);

            URL  announce_url = torrent.getAnnounceURL();
           
            if ( announce_url.getProtocol().equalsIgnoreCase( "https" )){
             
              SESecurityManager.setCertificateHandler(
                  announce_url,
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.pluginsimpl.local.torrent.TorrentImpl

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.