|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavazoom.download.DownloadSource
javazoom.download.DownloadFolderSource
This class implements a DownloadSource for folder. All files are downloaded from a folder (e.g /usr/local/download).
Field Summary | |
static int |
BUFFERSIZE
Buffer size to read file from disk and write to user's outputstream. |
Constructor Summary | |
DownloadFolderSource(java.util.Properties meta)
|
Method Summary | |
void |
download(FileInfo fi,
java.io.OutputStream outdata)
Sends file to download (binary) to end-user. |
int |
getDataLength(FileInfo fi)
Returns file length or -1 if file is not found or not readable. |
java.util.Vector |
listFiles(Config c,
boolean enablesubfolders)
List files in folder. |
void |
recurseList(java.io.File dir,
java.util.Vector dirList,
boolean recurse)
Find all files in a given folder and subfolders. |
Methods inherited from class javazoom.download.DownloadSource |
getMeta |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int BUFFERSIZE
Constructor Detail |
public DownloadFolderSource(java.util.Properties meta)
Method Detail |
public int getDataLength(FileInfo fi)
getDataLength
in class DownloadSource
fi
- FileInfo to download
public void download(FileInfo fi, java.io.OutputStream outdata) throws java.io.IOException
download
in class DownloadSource
fi
- FileInfo to downloadoutdata
- OutputStream for current user.
java.io.IOException
public java.util.Vector listFiles(Config c, boolean enablesubfolders)
listFiles
in class DownloadSource
c
- Configenablesubfolders
- boolean
public void recurseList(java.io.File dir, java.util.Vector dirList, boolean recurse)
dir
- FiledirList
- Vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |