@Component(value="ui_StreamResource") @Scope(value="prototype") public class StreamResourceImpl extends AbstractStreamSettingsResource implements WebResource, StreamResource
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
mimeType |
protected java.util.function.Supplier<java.io.InputStream> |
streamSupplier |
bufferSize, cacheTime, fileName
hasSource, resource, resourceUpdateHandler
Constructor and Description |
---|
StreamResourceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
createResource() |
java.lang.String |
getMimeType() |
java.util.function.Supplier<java.io.InputStream> |
getStreamSupplier() |
void |
setMimeType(java.lang.String mimeType)
Sets the mime type of the resource.
|
StreamResource |
setStreamSupplier(java.util.function.Supplier<java.io.InputStream> streamSupplier) |
getBufferSize, getCacheTime, getFileName, setBufferSize, setCacheTime, setFileName
fireResourceUpdateEvent, getResource, hasSource, setResourceUpdatedHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResource, hasSource
getBufferSize, getCacheTime, getFileName, setBufferSize, setCacheTime, setFileName
protected java.util.function.Supplier<java.io.InputStream> streamSupplier
protected java.lang.String mimeType
public StreamResource setStreamSupplier(java.util.function.Supplier<java.io.InputStream> streamSupplier)
setStreamSupplier
in interface StreamResource
public java.util.function.Supplier<java.io.InputStream> getStreamSupplier()
getStreamSupplier
in interface StreamResource
protected void createResource()
createResource
in class AbstractResource
public void setMimeType(java.lang.String mimeType)
ResourceView.HasMimeType
setMimeType
in interface ResourceView.HasMimeType
mimeType
- the MIME type to be setpublic java.lang.String getMimeType()
getMimeType
in interface ResourceView.HasMimeType