Examples of TOTorrentCreator


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

    TOTorrent torrent = null;
    String pieceSizeStr = (String) parameters.get("force_piece_size_pow2");
    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 {
      try {
        TOTorrentCreator creator = TOTorrentFactory.createFromFileOrDirWithComputedPieceLength(fSrc,url);
        creator.addListener( this );
        torrent = creator.create();
      } catch(Exception e) {
        e.printStackTrace();
        return;
      }
    }
View Full Code Here

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

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

           
            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
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.