org.gudy.azureus2.core3.download.impl
Class DownloadManagerController.fileInfoFacade
java.lang.Object
org.gudy.azureus2.core3.download.impl.DownloadManagerController.fileInfoFacade
- All Implemented Interfaces:
- DiskManagerFileInfo
- Enclosing class:
- DownloadManagerController
protected class DownloadManagerController.fileInfoFacade
- extends Object
- implements DiskManagerFileInfo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DownloadManagerController.fileInfoFacade
protected DownloadManagerController.fileInfoFacade()
setDelegate
protected void setDelegate(DiskManagerFileInfo new_delegate)
setPriority
public void setPriority(int b)
- Specified by:
setPriority
in interface DiskManagerFileInfo
setSkipped
public void setSkipped(boolean b)
- Specified by:
setSkipped
in interface DiskManagerFileInfo
setLink
public boolean setLink(File link_destination)
- Description copied from interface:
DiskManagerFileInfo
- Relink the file to the destination given - this method deals with if the file
is part of a simple torrent or not (so it may set the download name to keep it
in sync). If you just want a simple relink, use setLinkAtomic.
- Specified by:
setLink
in interface DiskManagerFileInfo
- Returns:
setLinkAtomic
public boolean setLinkAtomic(File link_destination)
- Specified by:
setLinkAtomic
in interface DiskManagerFileInfo
getLink
public File getLink()
- Specified by:
getLink
in interface DiskManagerFileInfo
setStorageType
public boolean setStorageType(int type)
- Description copied from interface:
DiskManagerFileInfo
- Download must be stopped before calling this!
- Specified by:
setStorageType
in interface DiskManagerFileInfo
- Parameters:
type
- one of ST_LINEAR or ST_COMPACT
getStorageType
public int getStorageType()
- Specified by:
getStorageType
in interface DiskManagerFileInfo
getAccessMode
public int getAccessMode()
- Specified by:
getAccessMode
in interface DiskManagerFileInfo
getDownloaded
public long getDownloaded()
- Specified by:
getDownloaded
in interface DiskManagerFileInfo
getExtension
public String getExtension()
- Specified by:
getExtension
in interface DiskManagerFileInfo
getFirstPieceNumber
public int getFirstPieceNumber()
- Specified by:
getFirstPieceNumber
in interface DiskManagerFileInfo
getLastPieceNumber
public int getLastPieceNumber()
- Specified by:
getLastPieceNumber
in interface DiskManagerFileInfo
getLength
public long getLength()
- Specified by:
getLength
in interface DiskManagerFileInfo
getNbPieces
public int getNbPieces()
- Specified by:
getNbPieces
in interface DiskManagerFileInfo
getPriority
public int getPriority()
- Specified by:
getPriority
in interface DiskManagerFileInfo
isSkipped
public boolean isSkipped()
- Specified by:
isSkipped
in interface DiskManagerFileInfo
getIndex
public int getIndex()
- Specified by:
getIndex
in interface DiskManagerFileInfo
getDiskManager
public DiskManager getDiskManager()
- Specified by:
getDiskManager
in interface DiskManagerFileInfo
getDownloadManager
public DownloadManager getDownloadManager()
- Specified by:
getDownloadManager
in interface DiskManagerFileInfo
getFile
public File getFile(boolean follow_link)
- Specified by:
getFile
in interface DiskManagerFileInfo
getTorrentFile
public TOTorrentFile getTorrentFile()
- Specified by:
getTorrentFile
in interface DiskManagerFileInfo
flushCache
public void flushCache()
throws Exception
- Specified by:
flushCache
in interface DiskManagerFileInfo
- Throws:
Exception
read
public DirectByteBuffer read(long offset,
int length)
throws IOException
- Specified by:
read
in interface DiskManagerFileInfo
- Throws:
IOException
getReadBytesPerSecond
public int getReadBytesPerSecond()
- Specified by:
getReadBytesPerSecond
in interface DiskManagerFileInfo
getWriteBytesPerSecond
public int getWriteBytesPerSecond()
- Specified by:
getWriteBytesPerSecond
in interface DiskManagerFileInfo
getETA
public long getETA()
- Specified by:
getETA
in interface DiskManagerFileInfo
close
public void close()
- Specified by:
close
in interface DiskManagerFileInfo
addListener
public void addListener(DiskManagerFileInfoListener listener)
- Specified by:
addListener
in interface DiskManagerFileInfo
removeListener
public void removeListener(DiskManagerFileInfoListener listener)
- Specified by:
removeListener
in interface DiskManagerFileInfo