public class DownloadStreamResource
extends com.vaadin.server.StreamResource
StreamResource
which makes sure #getStream always returns the same instance of DownloadStream
.DownloadStream
when calling #getStream, that way DownloadStream#params gets lost and makes it difficult to add custom response headers.
See JIRA MGNLUI-3274.)Constructor and Description |
---|
DownloadStreamResource(com.vaadin.server.StreamResource.StreamSource streamSource,
String filename)
Creates a new stream resource for downloading from stream.
|
Modifier and Type | Method and Description |
---|---|
com.vaadin.server.DownloadStream |
getStream()
Returns the
DownloadStream instance. |
public DownloadStreamResource(com.vaadin.server.StreamResource.StreamSource streamSource, String filename)
streamSource
- the source Stream.filename
- the name of the file.public com.vaadin.server.DownloadStream getStream()
DownloadStream
instance.
Unlike the method of the superclass, this one doesn't create a new instance if it is already existing.getStream
in interface com.vaadin.server.ConnectorResource
getStream
in class com.vaadin.server.StreamResource
Copyright © 2020 Magnolia International Ltd.. All rights reserved.