Class DiskManagerFileInfoFile
java.lang.Object
com.biglybt.core.download.DiskManagerFileInfoFile
- All Implemented Interfaces:
DiskManagerFileInfo
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface DiskManagerFileInfo
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL, READ, WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener) Creates a random read request - these will be executed against the download sequentiallyintlongbyte[]getFile()getFile(boolean follow_link) returns liked file if it exists, direct otherwiseintintgetIndex()longlongSize when file is completegetLink()intintlongbooleanbooleanbooleanvoidsetDeleted(boolean b) Mark the file as deleted or not (deleted means the file will be truncated to take up minimum space).voidvoidsetNumericPriority(int priority) Sets the file's download priority base on a numbervoidsetPriority(boolean b) voidsetSkipped(boolean b) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DiskManagerFileInfo
setLink
-
Field Details
-
hash
private byte[] hash -
file
File file
-
-
Constructor Details
-
DiskManagerFileInfoFile
-
-
Method Details
-
setPriority
public void setPriority(boolean b) - Specified by:
setPriorityin interfaceDiskManagerFileInfo
-
getNumericPriority
public int getNumericPriority()- Specified by:
getNumericPriorityin interfaceDiskManagerFileInfo- Returns:
-
setNumericPriority
public void setNumericPriority(int priority) Description copied from interface:DiskManagerFileInfoSets the file's download priority base on a number- Specified by:
setNumericPriorityin interfaceDiskManagerFileInfo- Parameters:
priority- Any number orDiskManagerFileInfo.PRIORITY_LOW,DiskManagerFileInfo.PRIORITY_NORMAL,DiskManagerFileInfo.PRIORITY_HIGH
-
setSkipped
public void setSkipped(boolean b) - Specified by:
setSkippedin interfaceDiskManagerFileInfo
-
isSkipping
- Specified by:
isSkippingin interfaceDiskManagerFileInfo
-
setDeleted
public void setDeleted(boolean b) Description copied from interface:DiskManagerFileInfoMark the file as deleted or not (deleted means the file will be truncated to take up minimum space). This is generally 0 invalid input: '<'= X invalid input: '<' 2*piece_length as pieces can span file boundaries.- Specified by:
setDeletedin interfaceDiskManagerFileInfo- Parameters:
b-
-
setLink
- Specified by:
setLinkin interfaceDiskManagerFileInfo
-
getLink
- Specified by:
getLinkin interfaceDiskManagerFileInfo
-
getAccessMode
public int getAccessMode()- Specified by:
getAccessModein interfaceDiskManagerFileInfo
-
getDownloaded
public long getDownloaded()- Specified by:
getDownloadedin interfaceDiskManagerFileInfo
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceDiskManagerFileInfo
-
getLength
public long getLength()Description copied from interface:DiskManagerFileInfoSize when file is complete- Specified by:
getLengthin interfaceDiskManagerFileInfo
-
getFile
- Specified by:
getFilein interfaceDiskManagerFileInfo
-
getFile
Description copied from interface:DiskManagerFileInforeturns liked file if it exists, direct otherwise- Specified by:
getFilein interfaceDiskManagerFileInfo- Parameters:
follow_link-- Returns:
-
getIndex
public int getIndex()- Specified by:
getIndexin interfaceDiskManagerFileInfo
-
getFirstPieceNumber
public int getFirstPieceNumber()- Specified by:
getFirstPieceNumberin interfaceDiskManagerFileInfo
-
getPieceSize
public long getPieceSize()- Specified by:
getPieceSizein interfaceDiskManagerFileInfo
-
getNumPieces
public int getNumPieces()- Specified by:
getNumPiecesin interfaceDiskManagerFileInfo
-
isPriority
public boolean isPriority()- Specified by:
isPriorityin interfaceDiskManagerFileInfo
-
isSkipped
public boolean isSkipped()- Specified by:
isSkippedin interfaceDiskManagerFileInfo
-
isDeleted
public boolean isDeleted()- Specified by:
isDeletedin interfaceDiskManagerFileInfo
-
getDownloadHash
public byte[] getDownloadHash()- Specified by:
getDownloadHashin interfaceDiskManagerFileInfo
-
getDownload
- Specified by:
getDownloadin interfaceDiskManagerFileInfo- Throws:
DownloadException
-
createChannel
- Specified by:
createChannelin interfaceDiskManagerFileInfo- Throws:
DownloadException
-
createRandomReadRequest
public DiskManagerRandomReadRequest createRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener) throws DownloadException Description copied from interface:DiskManagerFileInfoCreates a random read request - these will be executed against the download sequentially- Specified by:
createRandomReadRequestin interfaceDiskManagerFileInfo- Parameters:
file_offset-length-reverse_order- - deliver blocks to the listener in reverse orderlistener-- Returns:
- Throws:
DownloadException
-