|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class implementing the IFileList interface represents a list of files which can be reached on a peer with a specific URL prefix.
The class should implement a constructor taking two arguments:
The first argument is a java.lang.String
representing
the protocol, host, and port number of the ShareMe peer to access
the files in the FileList. The string must have the following
format: {protocol}"://"{host}":"{port}
(e.g. "http://pent223.infosys.tuwien.ac.at:10003"
)
The second parameter is an array of IFile
files to be put
into the FileList.
Method Summary | |
java.util.Enumeration |
files()
Returns a java.lang.Enumeartion of the FileList
elements. |
java.lang.String |
getDownloadURLPrefix()
Returns the URL prefix. |
void |
printToStream(java.io.OutputStream os)
Prints the file list elements (path + file name + (size)) on the given java.io.OutputStream. |
int |
size()
Returns the number of entries in the file list. |
Method Detail |
public java.util.Enumeration files()
java.lang.Enumeartion
of the FileList
elements.
java.lang.Enumeartion
of IFile
elements in
the list.public java.lang.String getDownloadURLPrefix()
public int size()
public void printToStream(java.io.OutputStream os) throws ShareMeException
os
- java.io.OutStream to write the file list at.
ShareMeException
- If no output stream passed to print.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |