|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.servlets.OwMultifileDownload.OwFolderArchiveEntry
protected class OwMultifileDownload.OwFolderArchiveEntry
A folder archive entry. A folder can contain multiple entries under the same name. The name-conflicting entries are indexed when the folder is zipped.
Constructor Summary | |
---|---|
OwMultifileDownload.OwFolderArchiveEntry()
|
Method Summary | |
---|---|
void |
addChild(String childName_p,
OwMultifileDownload.OwContentArchiveEntry entry_p)
Add new child entry to current folder entry. |
int |
fileCount()
|
boolean |
isSingleFileEntry()
|
void |
serveSingleFileOn(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
String fileName_p)
Serializes the content on the response output stream of the HttpServletResponse parameter
as a single file ID this entry is a single-file-entry |
void |
zipIt(org.apache.tools.zip.ZipOutputStream zipOutputStream_p,
String path_p)
Adds the content represented by this archive entry to the specified ZipOutputStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OwMultifileDownload.OwFolderArchiveEntry()
Method Detail |
---|
public void addChild(String childName_p, OwMultifileDownload.OwContentArchiveEntry entry_p)
childName_p
- the name under which the entry will be addedentry_p
- the entry to addpublic int fileCount()
fileCount
in interface OwMultifileDownload.OwContentArchiveEntry
public boolean isSingleFileEntry()
true
if the entries hierarchy represented
by this folder contains one and only one filepublic void serveSingleFileOn(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p, String fileName_p) throws OwInvalidOperationException
HttpServletResponse
parameter
as a single file ID this entry is a single-file-entry
serveSingleFileOn
in interface OwMultifileDownload.OwContentArchiveEntry
response_p
- the HTTP response to serialize the content onfileName_p
- the name under which the content should be serializedrequest_p
- HttpServletRequest
OwInvalidOperationException
- if the response serialization is not possible (for example
because this entry contains multiple files)public void zipIt(org.apache.tools.zip.ZipOutputStream zipOutputStream_p, String path_p) throws Exception
OwMultifileDownload.OwContentArchiveEntry
ZipOutputStream
zipIt
in interface OwMultifileDownload.OwContentArchiveEntry
zipOutputStream_p
- the ZipOutputStream
to serialize the content onpath_p
- the path under which the content should be serialized on the ZipOutputStream
Exception
- if an error occurs during ZIP serialization (content access related errors
should not be treated locally and logged)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |