Examples of serialiseToMap()


Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

            }
          }
        }
      }

      baos.write( BEncoder.encode( torrent_to_send.serialiseToMap()));

      setContentType( "application/x-bittorrent" );

    }catch( TOTorrentException e ){
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

    try{
      File file = new File  ( "C:\\temp\\test.torrent");
     
      TOTorrent  torrent = TOTorrentFactory.deserialiseFromBEncodedFile( file );
     
      Map  map = torrent.serialiseToMap();
     
      List  urls = new ArrayList();
     
      urls.add( "http://192.168.1.2:8080/test.dat" );
     
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

     
      File file = new File  ( "C:\\temp\\httpseed.torrent");
     
      TOTorrent  torrent = TOTorrentFactory.deserialiseFromBEncodedFile( file );
     
      Map  map = torrent.serialiseToMap();
     
      /*
      List  urls = (List)map.get( "url-list" );
       
      if ( urls == null ){
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

                        if ( ext.startsWith( "&" )){
                         
                          ext = ext.substring(1);
                        }
                     
                        torrent = TOTorrentFactory.deserialiseFromMap( torrent.serialiseToMap());
                       
                        torrent.setAnnounceURL( appendToURL( torrent.getAnnounceURL(), ext ));
                       
                        TOTorrentAnnounceURLSet[] sets = torrent.getAnnounceURLGroup().getAnnounceURLSets();
                       
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

                  }
                 
                  String add_result =
                    addTorrent(                    
                      hash_str,
                      ByteFormatter.encodeStringFully( BEncoder.encode( torrent.serialiseToMap())));
                 
                  log( download, "AddDownload succeeded" );
                 
                  if ( add_result.equals( "OK" )){
                   
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

              l.add( s.getBytes( "UTF-8" ));
            }
           
            torrent.setAdditionalProperty( "url-list", l );
           
            torrent_data = BEncoder.encode( torrent.serialiseToMap());
          }
         
        }catch( Throwable e ){
        }
      }
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

      try{
        TOTorrent t = TOTorrentFactory.deserialiseFromBEncodedInputStream( is );
       
        TorrentUtils.setPeerCacheValid( t );
   
        return( BEncoder.encode( t.serialiseToMap()));
       
      }catch( Throwable e ){             
      }
    }else if ( x instanceof ResourceDownloaderException ){
     
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

       
        // remove any non-standard stuff (e.g. resume data)

        torrent_to_send.removeAdditionalProperties();

        torrent_map = torrent_to_send.serialiseToMap();
       
        if ( vuze_map != null ){
         
          torrent_map.put( "vuze", vuze_map );
        }
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

              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 );
             
              torrent = TOTorrentFactory.deserialiseFromMap( torrent_map );
             
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent.serialiseToMap()

        TOTorrent torrent = dm.getTorrent();
        if (torrent != null && !TorrentUtils.isReallyPrivate(torrent)) {
          try {
            // make a copy of the torrent
 
            Map torrent_map = torrent.serialiseToMap();
            TOTorrent torrent_to_send = TOTorrentFactory.deserialiseFromMap( torrent_map );
            Map  vuze_map = (Map)torrent_map.get( "vuze" );
            // remove any non-standard stuff (e.g. resume data)
            torrent_to_send.removeAdditionalProperties();
            torrent_map = torrent_to_send.serialiseToMap();
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.