Constructor and Description |
---|
FileResource(File file,
FileResourceManager manager,
String path) |
Modifier and Type | Method and Description |
---|---|
String |
getCacheKey() |
Long |
getContentLength() |
String |
getContentType(MimeMappings mimeMappings)
Return the resources content type.
|
ETag |
getETag() |
File |
getFile() |
Date |
getLastModified() |
String |
getLastModifiedString() |
String |
getName() |
String |
getPath() |
File |
getResourceManagerRoot()
Returns the resource manager root.
|
URL |
getUrl() |
boolean |
isDirectory() |
List<Resource> |
list() |
void |
serve(Sender sender,
HttpServerExchange exchange,
IoCallback callback)
Serve the resource, and call the provided callback when complete.
|
public FileResource(File file, FileResourceManager manager, String path)
public String getPath()
public Date getLastModified()
getLastModified
in interface Resource
public String getLastModifiedString()
getLastModifiedString
in interface Resource
public ETag getETag()
public String getName()
public boolean isDirectory()
isDirectory
in interface Resource
true
if this resource represents a directorypublic String getContentType(MimeMappings mimeMappings)
Resource
getContentType
in interface Resource
public void serve(Sender sender, HttpServerExchange exchange, IoCallback callback)
Resource
public Long getContentLength()
getContentLength
in interface Resource
public String getCacheKey()
getCacheKey
in interface Resource
public File getFile()
public File getResourceManagerRoot()
Resource
getResourceManagerRoot
in interface Resource
Copyright © 2014 JBoss by Red Hat. All rights reserved.