public class ResourceProvider extends Object implements RenderAssetProvider
| Constructor and Description |
|---|
ResourceProvider(InputStream indexinputstream,
InputStream serverbundleinputstream,
Charset charset)
Create a new resource provider that provides cached assets.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getIndexContent()
Get the cached content of the index template.
|
File |
getServerBundle()
Get the cached file of the server bundle.
|
boolean |
isLiveReloadRequired(Date date)
Check if the provider detected an asset chance and wishes a live reload.
|
boolean |
isLiveReloadSupported()
Check if the provider does support live reload.
|
public ResourceProvider(InputStream indexinputstream, InputStream serverbundleinputstream, Charset charset) throws IOException
indexinputstream - Input stream that is used to read the index template fromserverbundleinputstream - Input stream that is used to read the server bundle fromcharset - Charset that will be used to read and write streams and filesIOException - Exception in case of an IO/stream problempublic String getIndexContent() throws IOException
getIndexContent in interface RenderAssetProviderIOException - Exception in case of an IO problempublic File getServerBundle() throws IOException
getServerBundle in interface RenderAssetProviderIOException - Exception in case of an IO problempublic boolean isLiveReloadSupported()
isLiveReloadSupported in interface RenderAssetProviderpublic boolean isLiveReloadRequired(Date date)
isLiveReloadRequired in interface RenderAssetProviderdate - Date of the last reloadCopyright © 2017. All rights reserved.