|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Response
A single result from a query reply message. (In hindsight, "Result" would have been a better name.) Besides basic file information, responses can include metadata. Response was originally intended to be immutable, but it currently includes mutator methods for metadata; these will be removed in the future.
| Method Summary | |
|---|---|
long |
getCreateTime()
Returns the create time. |
LimeXMLDocument |
getDocument()
Returns this' metadata or null if there is no meta
data for this response. |
byte[] |
getExtBytes()
|
int |
getIncomingLength()
|
long |
getIndex()
Returns the index for the file stored in this Response instance. |
Set<? extends IpPort> |
getLocations()
Returns an immutable Set of Endpoint that contain the same file described in this Response. |
String |
getName()
Returns the name of the file for this response. |
IntervalSet |
getRanges()
|
long |
getSize()
Returns the size of the file for this Response instance (in bytes). |
Set<URN> |
getUrns()
Returns an immutable Set of URN instances for this Response. |
boolean |
isMetaFile()
|
boolean |
isVerified()
|
void |
setDocument(LimeXMLDocument doc)
Sets this' metadata. |
RemoteFileDesc |
toRemoteFileDesc(QueryReply queryReply,
Address address,
RemoteFileDescFactory remoteFileDescFactory,
PushEndpointFactory pushEndpointFactory)
Returns this Response as a RemoteFileDesc. |
void |
writeToStream(OutputStream os)
Like writeToArray(), but writes to an OutputStream. |
| Method Detail |
|---|
void writeToStream(OutputStream os)
throws IOException
IOExceptionvoid setDocument(LimeXMLDocument doc)
doc - the parsed XML metadataint getIncomingLength()
long getIndex()
long getSize()
String getName()
LimeXMLDocument getDocument()
null if there is no meta
data for this response.
Set<URN> getUrns()
Set<? extends IpPort> getLocations()
long getCreateTime()
boolean isMetaFile()
byte[] getExtBytes()
IntervalSet getRanges()
boolean isVerified()
RemoteFileDesc toRemoteFileDesc(QueryReply queryReply,
Address address,
RemoteFileDescFactory remoteFileDescFactory,
PushEndpointFactory pushEndpointFactory)
throws UnknownHostException
address - can be null, if not will be used for creating RemoteFileDesc
otherwise address will be constructed from queryReply
UnknownHostException
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||