org.gudy.azureus2.plugins.disk
Interface DiskManagerFileInfo


public interface DiskManagerFileInfo

Since:
2.1.0.0
Author:
TuxPaper

Field Summary
static int PRIORITY_HIGH
           
static int PRIORITY_LOW
           
static int PRIORITY_NORMAL
           
static int READ
           
static int WRITE
           
 
Method Summary
 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 sequentially
 int 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 otherwise
 int getFirstPieceNumber()
           
 int getIndex()
           
 long getLength()
          Size when file is complete
 java.io.File getLink()
           
 int getNumericPriority()
           
 int getNumericPriorty()
          Deprecated.  
 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 number
 void 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 or PRIORITY_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()

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()

getNumericPriorty

int getNumericPriorty()
Deprecated. 

Returns:
Since:
4407

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 order
listener -
Returns:
Throws:
DownloadException