📄 diskmanagerfileinfoimpl.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: DiskManagerFileInfoImpl.java
package org.gudy.azureus2.pluginsimpl.local.disk;
import java.io.File;
import org.gudy.azureus2.core3.disk.DiskManagerFileInfo;
import org.gudy.azureus2.core3.download.DownloadManager;
import org.gudy.azureus2.core3.util.Debug;
import org.gudy.azureus2.plugins.disk.DiskManagerChannel;
import org.gudy.azureus2.plugins.download.Download;
import org.gudy.azureus2.plugins.download.DownloadException;
import org.gudy.azureus2.plugins.torrent.Torrent;
import org.gudy.azureus2.pluginsimpl.local.download.DownloadImpl;
import org.gudy.azureus2.pluginsimpl.local.download.DownloadManagerImpl;
// Referenced classes of package org.gudy.azureus2.pluginsimpl.local.disk:
// DiskManagerChannelImpl
public class DiskManagerFileInfoImpl
implements org.gudy.azureus2.plugins.disk.DiskManagerFileInfo
{
protected DownloadImpl download;
protected DiskManagerFileInfo core;
public DiskManagerFileInfoImpl(DownloadImpl _download, DiskManagerFileInfo coreFileInfo)
{
core = coreFileInfo;
download = _download;
}
public void setPriority(boolean b)
{
core.setPriority(b);
}
public void setSkipped(boolean b)
{
core.setSkipped(b);
}
public void setDeleted(boolean b)
{
if (b)
core.setStorageType(2);
else
core.setStorageType(1);
}
public boolean isDeleted()
{
return core.getStorageType() == 2;
}
public void setLink(File link_destination)
{
core.setLink(link_destination);
}
public File getLink()
{
return core.getLink();
}
public int getAccessMode()
{
return core.getAccessMode();
}
public long getDownloaded()
{
return core.getDownloaded();
}
public long getLength()
{
return core.getLength();
}
public File getFile()
{
return core.getFile(false);
}
public int getFirstPieceNumber()
{
return core.getFirstPieceNumber();
}
public long getPieceSize()
{
return getDownload().getTorrent().getPieceSize();
Throwable e;
e;
Debug.printStackTrace(e);
return 0L;
}
public int getNumPieces()
{
return core.getNbPieces();
}
public boolean isPriority()
{
return core.isPriority();
}
public boolean isSkipped()
{
return core.isSkipped();
}
public int getIndex()
{
return core.getIndex();
}
public byte[] getDownloadHash()
throws DownloadException
{
return getDownload().getTorrent().getHash();
}
public Download getDownload()
throws DownloadException
{
if (download != null)
return download;
else
return DownloadManagerImpl.getDownloadStatic(core.getDownloadManager());
}
public DiskManagerChannel createChannel()
throws DownloadException
{
if (core.getDownloadManager().getTorrent() == null)
throw new DownloadException("Torrent invalid");
else
return new DiskManagerChannelImpl(download, this);
}
public DiskManagerFileInfo getCore()
{
return core;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -