com.wewebu.ow.server.servlets
Class OwMultifileDownload.OwBufferedSingleContentEntry
java.lang.Object
com.wewebu.ow.server.servlets.OwMultifileDownload.OwBufferedSingleContentEntry
- All Implemented Interfaces:
- OwMultifileDownload.OwContentArchiveEntry
- Direct Known Subclasses:
- OwMultifileDownload.OwContentElementEntry
- Enclosing class:
- OwMultifileDownload
protected abstract class OwMultifileDownload.OwBufferedSingleContentEntry
- extends Object
- implements OwMultifileDownload.OwContentArchiveEntry
An archive entry containing a single content file.
Method Summary |
protected abstract String |
createMimeType()
(overridable) MIME type creating hook method. |
protected abstract void |
downloadFile(javax.servlet.ServletOutputStream responseOutputStream_p)
(overridable) method |
int |
fileCount()
|
void |
serveSingleFileOn(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
String fileName_p)
Serializes the content on the HttpServletResponse
parameter using the content type acquired through createMimeType() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OwMultifileDownload.OwBufferedSingleContentEntry
protected OwMultifileDownload.OwBufferedSingleContentEntry()
fileCount
public final int fileCount()
- Specified by:
fileCount
in interface OwMultifileDownload.OwContentArchiveEntry
- Returns:
- the number of files contained by this entry and all its sub entries
downloadFile
protected abstract void downloadFile(javax.servlet.ServletOutputStream responseOutputStream_p)
throws Exception
- (overridable) method
- Throws:
Exception
- Since:
- 3.1.0.0
createMimeType
protected abstract String createMimeType()
throws Exception
- (overridable) MIME type creating hook method.
- Returns:
- a MIME type String
- Throws:
Exception
serveSingleFileOn
public final void serveSingleFileOn(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
String fileName_p)
throws OwInvalidOperationException
- Serializes the content on the
HttpServletResponse
parameter using the content type acquired through createMimeType()
.
- Specified by:
serveSingleFileOn
in interface OwMultifileDownload.OwContentArchiveEntry
- Parameters:
request_p
- HttpServletRequestresponse_p
- the HTTP response to serialize the content onfileName_p
- the name under which the content should be serialized
- Throws:
OwInvalidOperationException
- if the response serialization is not possible (for example
because this entry contains multiple files)
Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.