Package at.letto.basespringboot.service
Class BaseDownloadService
java.lang.Object
at.letto.basespringboot.service.BaseDownloadService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Startet einen Download über einen HttpServletResponsevoid
Startet einen Download über einen HttpServletResponse
-
Constructor Details
-
BaseDownloadService
public BaseDownloadService()
-
-
Method Details
-
download
public void download(jakarta.servlet.http.HttpServletResponse response, File file) throws IOException Startet einen Download über einen HttpServletResponse- Parameters:
response
- HttpServletResponse für den Downloadfile
- Datei die heruntergeladen werden soll- Throws:
IOException
- Fehlermeldung wenn etwas nicht funktioniert
-
download
public void download(jakarta.servlet.http.HttpServletResponse response, File file, String filename) throws IOException Startet einen Download über einen HttpServletResponse- Parameters:
response
- HttpServletResponse für den Downloadfile
- Datei die heruntergeladen werden sollfilename
- Zieldateiname mit dem die Datei am Client gespeichert werden soll- Throws:
IOException
- Fehlermeldung wenn etwas nicht funktioniert
-