|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.FileDesc
com.limegroup.gnutella.IncompleteFileDesc
This class extends FileDesc and wraps an incomplete File, so it can be used for partial file sharing.
| Constructor Summary | |
IncompleteFileDesc(java.io.File file,
java.util.Set urns,
int index,
java.lang.String completedName,
int completedSize,
VerifyingFile vf)
Constructor for the IncompleteFileDesc object. |
|
| Method Summary | |
boolean |
add(AlternateLocation al)
Adds the alternate location to this FileDesc and also notifies the ManagedDownloader of a new location for this. |
int |
addAll(AlternateLocationCollection alc)
Adds the alternate locations to this FileDesc and also notifies the ManagedDownloader of new locations for this. |
boolean |
addVerified(AlternateLocation al)
Adds a verified location to this FileDesc, not notifying the ManagedDownloader of the location. |
java.io.InputStream |
createInputStream()
Opens an input stream to the File instance for this FileDesc. |
java.lang.String |
getAvailableRanges()
Returns the available ranges as an HTTP string value. |
java.lang.String |
getName()
Returns the completed name of this file. |
long |
getSize()
Returns the completed size of the file on disk, in bytes. |
java.lang.String |
httpStringValue()
Returns a string representation of the HTTP header value for this class. |
boolean |
isRangeSatisfiable(Interval range)
Determines whether or not the given interval is within the range of our incomplete file. |
boolean |
isRangeSatisfiable(int low,
int high)
Determines whether or not the given range is satisfied by this incomplete file. |
java.lang.String |
toString()
|
| Methods inherited from class com.limegroup.gnutella.FileDesc |
addLimeXMLDocument, addUrnsForSelf, calculateAndCacheURN, containsUrn, getAlternateLocationCollection, getAltLocsSize, getAttemptedUploads, getCompletedUploads, getFile, getHitCount, getIndex, getLimeXMLDocuments, getPath, getSHA1Urn, getUrns, hasAlternateLocations, hasUrns, incrementAttemptedUploads, incrementCompletedUploads, incrementHitCount, lastModified, remove, removeLimeXMLDocument, replaceLimeXMLDocument |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IncompleteFileDesc(java.io.File file,
java.util.Set urns,
int index,
java.lang.String completedName,
int completedSize,
VerifyingFile vf)
| Method Detail |
public long getSize()
getSize in class FileDescpublic java.lang.String getName()
getName in class FileDesc
public java.io.InputStream createInputStream()
throws java.io.FileNotFoundException
createInputStream in class FileDescFileNotFoundException - if the file represented
by the File instance could not be found
java.io.FileNotFoundExceptionpublic boolean add(AlternateLocation al)
add in interface AlternateLocationCollectoradd in class FileDescpublic boolean addVerified(AlternateLocation al)
public int addAll(AlternateLocationCollection alc)
addAll in interface AlternateLocationCollectoraddAll in class FileDescalc - the AlternateLocationCollection to addpublic java.lang.String getAvailableRanges()
public boolean isRangeSatisfiable(int low,
int high)
public boolean isRangeSatisfiable(Interval range)
public java.lang.String httpStringValue()
HTTPHeaderValue
httpStringValue in interface HTTPHeaderValuepublic java.lang.String toString()
toString in class FileDesc
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||