Package com.biglybt.pif.disk
Interface DiskManagerFileInfo
-
- All Known Implementing Classes:
DiskManagerFileInfoDelegate
,DiskManagerFileInfoFile
,DiskManagerFileInfoImpl
,DiskManagerFileInfoStream
,DiskManagerFileInfoURL
,RPDiskManagerFileInfo
,TranscodeJobOutputLeecher
public interface DiskManagerFileInfo
- Since:
- 2.1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
PRIORITY_HIGH
static int
PRIORITY_LOW
static int
PRIORITY_NORMAL
static int
READ
static int
WRITE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiskManagerChannel
createChannel()
DiskManagerRandomReadRequest
createRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener)
Creates a random read request - these will be executed against the download sequentiallyint
getAccessMode()
Download
getDownload()
long
getDownloaded()
byte[]
getDownloadHash()
java.io.File
getFile()
java.io.File
getFile(boolean follow_link)
returns liked file if it exists, direct otherwiseint
getFirstPieceNumber()
int
getIndex()
long
getLastModified()
long
getLength()
Size when file is completejava.io.File
getLink()
int
getNumericPriority()
int
getNumPieces()
long
getPieceSize()
boolean
isDeleted()
boolean
isPriority()
boolean
isSkipped()
void
setDeleted(boolean b)
Mark the file as deleted or not (deleted means the file will be truncated to take up minimum space).void
setLink(java.io.File link_destination)
void
setNumericPriority(int priority)
Sets the file's download priority base on a numbervoid
setPriority(boolean b)
void
setSkipped(boolean b)
-
-
-
Field Detail
-
READ
static final int READ
- See Also:
- Constant Field Values
-
WRITE
static final int WRITE
- See Also:
- Constant Field Values
-
PRIORITY_LOW
static final int PRIORITY_LOW
- See Also:
- Constant Field Values
-
PRIORITY_NORMAL
static final int PRIORITY_NORMAL
- See Also:
- Constant Field Values
-
PRIORITY_HIGH
static final int PRIORITY_HIGH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPriority
void setPriority(boolean b)
-
setNumericPriority
void setNumericPriority(int priority)
Sets the file's download priority base on a number- Parameters:
priority
- Any number orPRIORITY_LOW
,PRIORITY_NORMAL
,PRIORITY_HIGH
- Since:
- 4407
-
setSkipped
void setSkipped(boolean b)
-
setDeleted
void setDeleted(boolean b)
Mark the file as deleted or not (deleted means the file will be truncated to take up minimum space). This is generally 0 <= X < 2*piece_length as pieces can span file boundaries.- Parameters:
b
-- Since:
- 2403
-
setLink
void setLink(java.io.File link_destination)
-
getLink
java.io.File getLink()
-
getAccessMode
int getAccessMode()
-
getDownloaded
long getDownloaded()
-
getLastModified
long getLastModified()
-
getLength
long getLength()
Size when file is complete
-
getFile
java.io.File getFile()
-
getFile
java.io.File getFile(boolean follow_link)
returns liked file if it exists, direct otherwise- Parameters:
follow_link
-- Returns:
- Since:
- 4.3.1.5
-
getIndex
int getIndex()
-
getFirstPieceNumber
int getFirstPieceNumber()
-
getPieceSize
long getPieceSize()
-
getNumPieces
int getNumPieces()
-
isPriority
boolean isPriority()
-
getNumericPriority
int getNumericPriority()
- Returns:
- Since:
- 4.8.1.3
-
isSkipped
boolean isSkipped()
-
isDeleted
boolean isDeleted()
-
getDownloadHash
byte[] getDownloadHash() throws DownloadException
- Throws:
DownloadException
-
getDownload
Download getDownload() throws DownloadException
- Throws:
DownloadException
-
createChannel
DiskManagerChannel createChannel() throws DownloadException
- Throws:
DownloadException
-
createRandomReadRequest
DiskManagerRandomReadRequest createRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener) throws DownloadException
Creates a random read request - these will be executed against the download sequentially- Parameters:
file_offset
-length
-reverse_order
- - deliver blocks to the listener in reverse orderlistener
-- Returns:
- Throws:
DownloadException
-
-