當前位置: 首頁>>代碼示例>>Java>>正文


Java DownloadManagerEnhancer類代碼示例

本文整理匯總了Java中com.aelitis.azureus.core.download.DownloadManagerEnhancer的典型用法代碼示例。如果您正苦於以下問題:Java DownloadManagerEnhancer類的具體用法?Java DownloadManagerEnhancer怎麽用?Java DownloadManagerEnhancer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DownloadManagerEnhancer類屬於com.aelitis.azureus.core.download包,在下文中一共展示了DownloadManagerEnhancer類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: canProgressiveOrIsComplete

import com.aelitis.azureus.core.download.DownloadManagerEnhancer; //導入依賴的package包/類
public static boolean canProgressiveOrIsComplete(TOTorrent torrent) {
	if (torrent == null) {
		return false;
	}
	try {
		DownloadManagerEnhancer enhancer = DownloadManagerEnhancer.getSingleton();
		EnhancedDownloadManager edm = DownloadManagerEnhancer.getSingleton().getEnhancedDownload(
				torrent.getHash());

		if (edm == null) {
			return enhancer.isProgressiveAvailable()
					&& PlatformTorrentUtils.isContentProgressive(torrent);
		}

		boolean complete = edm.getDownloadManager().isDownloadComplete(false);
		if (complete) {
			return true;
		}

		// not complete
		if (!edm.supportsProgressiveMode()) {
			return false;
		}
	} catch (TOTorrentException e) {
		return false;
	}

	return true;
}
 
開發者ID:thangbn,項目名稱:Direct-File-Downloader,代碼行數:30,代碼來源:PlayUtils.java

示例2: getPrimaryFileIndex

import com.aelitis.azureus.core.download.DownloadManagerEnhancer; //導入依賴的package包/類
/**
 * @deprecated but still used by EMP
 */
public static int getPrimaryFileIndex(Download dl) {
	EnhancedDownloadManager edm = DownloadManagerEnhancer.getSingleton().getEnhancedDownload( PluginCoreUtils.unwrap(dl) );
	
	if ( edm == null ) {
		
		return -1;
	}

	return edm.getPrimaryFileIndex();
}
 
開發者ID:thangbn,項目名稱:Direct-File-Downloader,代碼行數:14,代碼來源:PlayUtils.java

示例3: getEDM

import com.aelitis.azureus.core.download.DownloadManagerEnhancer; //導入依賴的package包/類
public EnhancedDownloadManager getEDM(DownloadManager dm) {
	DownloadManagerEnhancer dmEnhancer = DownloadManagerEnhancer.getSingleton();
	if (dmEnhancer == null) {
		return null;
	}
	return dmEnhancer.getEnhancedDownload(dm);
}
 
開發者ID:AcademicTorrents,項目名稱:AcademicTorrents-Downloader,代碼行數:8,代碼來源:ColumnProgressETA.java

示例4: prepareForPlay

import com.aelitis.azureus.core.download.DownloadManagerEnhancer; //導入依賴的package包/類
public static boolean prepareForPlay(DownloadManager dm) {
	EnhancedDownloadManager edm = DownloadManagerEnhancer.getSingleton().getEnhancedDownload(
			dm);

	if (edm != null) {

		edm.setProgressiveMode(true);

		return (true);
	}

	return (false);
}
 
開發者ID:thangbn,項目名稱:Direct-File-Downloader,代碼行數:14,代碼來源:PlayUtils.java


注:本文中的com.aelitis.azureus.core.download.DownloadManagerEnhancer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。