Class DiskManagerFileInfoURL
java.lang.Object
com.biglybt.core.download.DiskManagerFileInfoURL
- All Implemented Interfaces:
SEPasswordListener, DiskManagerFileInfo
public class DiskManagerFileInfoURL
extends Object
implements DiskManagerFileInfo, SEPasswordListener
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) Fileprivate booleanprivate byte[]private Object(package private) URL(package private) URLFields inherited from interface DiskManagerFileInfo
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL, READ, WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener) Creates a random read request - these will be executed against the download sequentiallyvoiddownload()intgetAuthentication(String realm, URL tracker) longbyte[]getFile()getFile(boolean follow_link) returns liked file if it exists, direct otherwiseintintgetIndex()longlongSize when file is completegetLink()intintlonggetURL()booleanbooleanbooleanvoidsetAuthenticationOutcome(String realm, URL tracker, boolean success) voidsetDeleted(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
-
Constructor Details
-
DiskManagerFileInfoURL
-
-
Method Details
-
getURL
-
download
public void download() -
setPriority
public void setPriority(boolean b) - Specified by:
setPriorityin interfaceDiskManagerFileInfo
-
setSkipped
public void setSkipped(boolean b) - Specified by:
setSkippedin interfaceDiskManagerFileInfo
-
isSkipping
- Specified by:
isSkippingin 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
-
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
- Specified by:
getDownloadHashin interfaceDiskManagerFileInfo- Throws:
DownloadException
-
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
-
getAuthentication
- Specified by:
getAuthenticationin interfaceSEPasswordListener
-
setAuthenticationOutcome
- Specified by:
setAuthenticationOutcomein interfaceSEPasswordListener
-
clearPasswords
public void clearPasswords()- Specified by:
clearPasswordsin interfaceSEPasswordListener
-