Class DownloadService
java.lang.Object
org.deltava.service.WebService
org.deltava.service.DownloadService
- Direct Known Subclasses:
DataExportService, PFPXScheduleService, RawTrackService, UpdateDownloadService, XMLClientDataService
A Web Service supporting file downloads.
- Since:
- 2.2
- Version:
- 12.4
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidSends a file to the HTTP output stream, either via mod_xsendfile or through native Java I/O streaming.protected static voidSends a file to the HTTP output stream, either via mod_xsendfile or through native Java I/O streaming.Methods inherited from class WebService
error, error, error, execute, isLogged, isSecureModifier and TypeMethodDescriptionprotected static ServiceExceptionCreates a ServiceException.protected static ServiceExceptionCreates a ServiceException.protected static ServiceExceptionCreates a ServiceException.abstract intexecute(ServiceContext ctx) Executes the Web Service.booleanisLogged()Returns whether this web service calls are logged.booleanisSecure()Returns whether this web service requires authentication.
-
Constructor Details
-
DownloadService
public DownloadService()
-
-
Method Details
-
sendFile
Sends a file to the HTTP output stream, either via mod_xsendfile or through native Java I/O streaming.- Parameters:
f- the file to sendrsp- the HTTP Servlet response
-
sendFile
protected static void sendFile(File f, jakarta.servlet.http.HttpServletResponse rsp, boolean doSendFile) Sends a file to the HTTP output stream, either via mod_xsendfile or through native Java I/O streaming.- Parameters:
f- the file to sendrsp- the HTTP Servlet responsedoSendFile- TRUE to use sendfile (if available), otherwise FALSE
-