⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plugincoreutils.java

📁 java 文件下载器。可自定义
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   PluginCoreUtils.java

package org.gudy.azureus2.pluginsimpl.local;

import org.gudy.azureus2.core3.disk.DiskManager;
import org.gudy.azureus2.core3.disk.DiskManagerFileInfo;
import org.gudy.azureus2.core3.download.DownloadManager;
import org.gudy.azureus2.core3.peer.PEPeer;
import org.gudy.azureus2.core3.peer.PEPeerManager;
import org.gudy.azureus2.core3.torrent.TOTorrent;
import org.gudy.azureus2.core3.tracker.host.TRHostTorrent;
import org.gudy.azureus2.core3.tracker.server.TRTrackerServerTorrent;
import org.gudy.azureus2.core3.util.Debug;
import org.gudy.azureus2.plugins.download.Download;
import org.gudy.azureus2.plugins.download.DownloadException;
import org.gudy.azureus2.plugins.peers.Peer;
import org.gudy.azureus2.plugins.peers.PeerManager;
import org.gudy.azureus2.plugins.torrent.Torrent;
import org.gudy.azureus2.plugins.tracker.TrackerTorrent;
import org.gudy.azureus2.pluginsimpl.local.disk.DiskManagerFileInfoImpl;
import org.gudy.azureus2.pluginsimpl.local.disk.DiskManagerImpl;
import org.gudy.azureus2.pluginsimpl.local.download.DownloadImpl;
import org.gudy.azureus2.pluginsimpl.local.download.DownloadManagerImpl;
import org.gudy.azureus2.pluginsimpl.local.peers.PeerImpl;
import org.gudy.azureus2.pluginsimpl.local.peers.PeerManagerImpl;
import org.gudy.azureus2.pluginsimpl.local.torrent.TorrentImpl;
import org.gudy.azureus2.pluginsimpl.local.tracker.TrackerTorrentImpl;

public class PluginCoreUtils
{

	public PluginCoreUtils()
	{
	}

	public static Torrent wrap(TOTorrent t)
	{
		return new TorrentImpl(t);
	}

	public static TOTorrent unwrap(Torrent t)
	{
		return ((TorrentImpl)t).getTorrent();
	}

	public static org.gudy.azureus2.plugins.disk.DiskManager wrap(DiskManager dm)
	{
		return new DiskManagerImpl(dm);
	}

	public static DiskManager unwrap(org.gudy.azureus2.plugins.disk.DiskManager dm)
	{
		return ((DiskManagerImpl)dm).getDiskmanager();
	}

	public static Download wrap(DownloadManager dm)
	{
		return DownloadManagerImpl.getDownloadStatic(dm);
		Throwable e;
		e;
		return null;
	}

	public static Object convert(Object datasource, boolean toCore)
	{
		if (!toCore)
			break MISSING_BLOCK_LABEL_151;
		if (datasource instanceof DownloadManager)
			return datasource;
		if (datasource instanceof DownloadImpl)
			return ((DownloadImpl)datasource).getDownload();
		if (datasource instanceof DiskManager)
			return datasource;
		if (datasource instanceof DiskManagerImpl)
			return ((DiskManagerImpl)datasource).getDiskmanager();
		if (datasource instanceof PEPeerManager)
			return datasource;
		if (datasource instanceof PeerManagerImpl)
			return ((PeerManagerImpl)datasource).getDelegate();
		if (datasource instanceof PEPeer)
			return datasource;
		if (datasource instanceof PeerImpl)
			return ((PeerImpl)datasource).getPEPeer();
		if (datasource instanceof DiskManagerFileInfo)
			return datasource;
		if (datasource instanceof DiskManagerFileInfoImpl)
			((DiskManagerFileInfoImpl)datasource).getCore();
		if (datasource instanceof TRHostTorrent)
			return datasource;
		if (datasource instanceof TrackerTorrentImpl)
			((TrackerTorrentImpl)datasource).getHostTorrent();
		break MISSING_BLOCK_LABEL_329;
		if (datasource instanceof DownloadManager)
			return wrap((DownloadManager)datasource);
		if (datasource instanceof DownloadImpl)
			return datasource;
		if (datasource instanceof DiskManager)
			return wrap((DiskManager)datasource);
		if (datasource instanceof DiskManagerImpl)
			return datasource;
		if (datasource instanceof PEPeerManager)
			return wrap((PEPeerManager)datasource);
		if (datasource instanceof PeerManagerImpl)
			return datasource;
		if (datasource instanceof PEPeer)
			return PeerManagerImpl.getPeerForPEPeer((PEPeer)datasource);
		if (datasource instanceof Peer)
			return datasource;
		DiskManagerFileInfo fileInfo;
		if (!(datasource instanceof DiskManagerFileInfo))
			break MISSING_BLOCK_LABEL_282;
		fileInfo = (DiskManagerFileInfo)datasource;
		if (fileInfo == null)
			break MISSING_BLOCK_LABEL_282;
		return new DiskManagerFileInfoImpl(DownloadManagerImpl.getDownloadStatic(fileInfo.getDownloadManager()), fileInfo);
		DownloadException e;
		e;
		if (datasource instanceof DiskManagerFileInfoImpl)
			return datasource;
		TRHostTorrent item;
		if (!(datasource instanceof TRHostTorrent))
			break MISSING_BLOCK_LABEL_312;
		item = (TRHostTorrent)datasource;
		return new TrackerTorrentImpl(item);
		if (datasource instanceof TrackerTorrentImpl)
			return datasource;
		break MISSING_BLOCK_LABEL_329;
		Throwable t;
		t;
		Debug.out(t);
		return datasource;
	}

	public static DownloadManager unwrap(Download dm)
	{
		if (dm instanceof DownloadImpl)
		{
			return ((DownloadImpl)dm).getDownload();
		} else
		{
			Debug.out((new StringBuilder()).append("Can't unwrap ").append(dm).toString());
			return null;
		}
	}

	public static PeerManager wrap(PEPeerManager pm)
	{
		return PeerManagerImpl.getPeerManager(pm);
	}

	public static PEPeerManager unwrap(PeerManager pm)
	{
		return ((PeerManagerImpl)pm).getDelegate();
	}

	public static TRTrackerServerTorrent unwrap(TrackerTorrent torrent)
	{
		return ((TrackerTorrentImpl)torrent).getHostTorrent().getTrackerTorrent();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -