public class FileProviderOptions extends Object
Options-Class for FileProvider
| Constructor and Description |
|---|
FileProviderOptions() |
| Modifier and Type | Method and Description |
|---|---|
DotFiles |
getDotFiles() |
String[] |
getExtensions() |
long |
getMaxAge() |
boolean |
isFallBackSearching() |
boolean |
isLastModified() |
void |
setDotFiles(DotFiles dotFiles)
Set how ".foo" file will be handled.
|
FileProviderOptions |
setExtensions(String... extensions)
Set the extension from the file which can be accessed outside.
|
FileProviderOptions |
setFallBackSearching(boolean fallBackSearching)
Activate the fallback-search.
|
FileProviderOptions |
setHandler(HttpRequestHandler handler)
Add an alternate request-handler which will be fired before the file will be send.
|
FileProviderOptions |
setLastModified(boolean lastModified)
Set the Last-Modified header to the last modified date of the file on the OS.
|
FileProviderOptions |
setMaxAge(long maxAge)
Set the max-age property of the Cache-Control header in milliseconds or a string in ms format.
|
public String[] getExtensions()
public FileProviderOptions setExtensions(String... extensions)
extensions - The extensions.public boolean isFallBackSearching()
public FileProviderOptions setFallBackSearching(boolean fallBackSearching)
/js/code.js was made but the
requested resource cannot be found. It will be looked for an file called code
and return it.
Default is false.
fallBackSearching - If you want to activate the file-fallback-search.public boolean isLastModified()
public FileProviderOptions setLastModified(boolean lastModified)
lastModified - If you want to send the last modified date of the file on the OS.public long getMaxAge()
public FileProviderOptions setMaxAge(long maxAge)
Default is 0.
maxAge - The new maxAge value.public FileProviderOptions setHandler(HttpRequestHandler handler)
handler - The HttpRequest handler.public DotFiles getDotFiles()
public void setDotFiles(DotFiles dotFiles)
dotFiles - The handling type.Copyright © 2019. All rights reserved.