byte[] hash = (byte[])attributes.get( AT_BTIH );
if ( hash == null ){
return( null );
}
String url_str = Constants.URL_PREFIX + Constants.URL_DOWNLOAD + Base32.encode( hash ) + ".torrent";
ResourceDownloaderFactory rdf = ResourceDownloaderFactoryImpl.getSingleton();
try{
ResourceDownloader rd = rdf.create( new URL( url_str ));
InputStream is = rd.download();
try{
TOTorrent torrent = TOTorrentFactory.deserialiseFromBEncodedInputStream( is );
return( new AzureusPlatformContent( new TorrentImpl( torrent )));
}finally{
is.close();
}
}catch( Throwable e ){
e.printStackTrace();
return( null );
}