RangeAwareResource
CachedResource
, FileResource
, PathResource
, URLResource
public interface Resource
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getCacheKey() |
|
java.lang.Long |
getContentLength() |
|
java.lang.String |
getContentType(MimeMappings mimeMappings) |
Return the resources content type.
|
ETag |
getETag() |
|
java.io.File |
getFile() |
|
java.nio.file.Path |
getFilePath() |
|
java.util.Date |
getLastModified() |
|
java.lang.String |
getLastModifiedString() |
|
java.lang.String |
getName() |
|
java.lang.String |
getPath() |
|
java.io.File |
getResourceManagerRoot() |
Returns the resource manager root.
|
java.nio.file.Path |
getResourceManagerRootPath() |
Returns the resource manager root.
|
java.net.URL |
getUrl() |
|
boolean |
isDirectory() |
|
java.util.List<Resource> |
list() |
|
void |
serve(Sender sender,
HttpServerExchange exchange,
IoCallback completionCallback) |
Serve the resource, and call the provided callback when complete.
|
java.lang.String getPath()
java.util.Date getLastModified()
java.lang.String getLastModifiedString()
ETag getETag()
java.lang.String getName()
boolean isDirectory()
true
if this resource represents a directoryjava.util.List<Resource> list()
java.lang.String getContentType(MimeMappings mimeMappings)
void serve(Sender sender, HttpServerExchange exchange, IoCallback completionCallback)
sender
- The sender to use.exchange
- The exchangejava.lang.Long getContentLength()
java.lang.String getCacheKey()
java.io.File getFile()
java.nio.file.Path getFilePath()
java.io.File getResourceManagerRoot()
java.nio.file.Path getResourceManagerRootPath()
java.net.URL getUrl()
Copyright © 2018. All rights reserved.