本文整理汇总了Java中org.gudy.azureus2.core3.download.DownloadManager.isDestroyed方法的典型用法代码示例。如果您正苦于以下问题:Java DownloadManager.isDestroyed方法的具体用法?Java DownloadManager.isDestroyed怎么用?Java DownloadManager.isDestroyed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gudy.azureus2.core3.download.DownloadManager
的用法示例。
在下文中一共展示了DownloadManager.isDestroyed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DiskManagerChannelImpl
import org.gudy.azureus2.core3.download.DownloadManager; //导入方法依赖的package包/类
protected
DiskManagerChannelImpl(
DownloadImpl _download,
org.gudy.azureus2.pluginsimpl.local.disk.DiskManagerFileInfoImpl _plugin_file )
throws DownloadException
{
download = _download;
plugin_file = _plugin_file;
core_file = plugin_file.getCore();
DownloadManager core_download = core_file.getDownloadManager();
if ( core_download.getTorrent() == null ){
throw( new DownloadException( "Torrent invalid" ));
}
if ( core_download.isDestroyed()){
Debug.out( "Download has been removed" );
throw( new DownloadException( "Download has been removed" ));
}
synchronized( DiskManagerChannelImpl.class ){
channel_id = channel_id_next++;
}
TOTorrentFile tf = core_file.getTorrentFile();
TOTorrent torrent = tf.getTorrent();
TOTorrentFile[] tfs = torrent.getFiles();
rtas = new long[torrent.getNumberOfPieces()];
core_download.addPeerListener( this );
for (int i=0;i<core_file.getIndex();i++){
file_offset_in_torrent += tfs[i].getLength();
}
piece_size = tf.getTorrent().getPieceLength();
core_file.addListener( this );
reportCreated( this );
}