Package com.vaadin.flow.server.streams
Interface InputStreamDownloadCallback
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A callback for providing an InputStream, other download meta-data and
handling logic for
InputStreamDownloadHandler
.
The method invocation may throw an IOException
to handle cases where
reading from InputStream fails.- Since:
- 24.8
-
Method Summary
Modifier and TypeMethodDescriptioncomplete
(DownloadEvent downloadEvent) Applies the givenDownloadEvent
to provide aDownloadResponse
.
-
Method Details
-
complete
Applies the givenDownloadEvent
to provide aDownloadResponse
.- Parameters:
downloadEvent
- the event containing information about the download request- Returns:
- a
DownloadResponse
containing the InputStream and other meta-data for the download - Throws:
IOException
- if an error occurs while reading from InputStream fails
-