public interface Resource
ResourceOrigin
s.
Note that ResourceOrigin
doesn't guarantee to always return the same Resource instance for an arbitrary path,
therefore implementors are responsible for providing meaningful equals
and hashCode
methods here.Modifier and Type | Method and Description |
---|---|
long |
getLastModified()
Returns the last modification date of this resource as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
|
String |
getName() |
ResourceOrigin |
getOrigin() |
Resource |
getParent() |
String |
getPath()
Returns the "absolute" path to this resource.
|
boolean |
isDirectory() |
boolean |
isEditable()
Determines whether this resource can be edited in its underlying origin.
|
boolean |
isFile() |
List<Resource> |
listChildren() |
Reader |
openReader()
Opens a
Reader for this resource; if the associated ResourceOrigin can guess it, this will have been
opened with the corrected encoding. |
InputStream |
openStream()
Opens an
InputStream for this resource. |
ResourceOrigin getOrigin()
boolean isFile()
boolean isDirectory()
boolean isEditable()
String getPath()
String getName()
long getLastModified()
Date.getTime()
Resource getParent()
InputStream openStream() throws IOException
InputStream
for this resource. Client code is expected to close the stream.IOException
openReader()
Reader openReader() throws IOException
Reader
for this resource; if the associated ResourceOrigin
can guess it, this will have been
opened with the corrected encoding. Client code is expected to close the reader.IOException
openStream()
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.