ResourceOrigin.registerResourceChangeHandler(ResourceChangeHandler)
allows for registering more sophisticated
resource change handlers rendering this class obsolete.@Deprecated public class ResourceStub extends Object implements Resource
ResourceVisitors
to handle such a case
accordingly.
NOTE: this class doesn't not support any Resource
operation and will throw an UnsupportedOperationException
on any attempt to use its API except for Resource.getPath()
.
Modifier and Type | Method and Description |
---|---|
long |
getLastModified()
Deprecated.
Returns the last modification date of this resource as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
|
String |
getName()
Deprecated.
|
ResourceOrigin |
getOrigin()
Deprecated.
|
Resource |
getParent()
Deprecated.
|
String |
getPath()
Deprecated.
Returns the "absolute" path to this resource.
|
boolean |
isDirectory()
Deprecated.
|
boolean |
isEditable()
Deprecated.
Determines whether this resource can be edited in its underlying origin.
|
boolean |
isFile()
Deprecated.
|
List<Resource> |
listChildren()
Deprecated.
|
Reader |
openReader()
Deprecated.
Opens a
Reader for this resource; if the associated ResourceOrigin can guess it, this will have been
opened with the corrected encoding. |
InputStream |
openStream()
Deprecated.
Opens an
InputStream for this resource. |
static ResourceStub |
withPath(String path)
Deprecated.
|
public static ResourceStub withPath(String path)
public String getPath()
Resource
public ResourceOrigin getOrigin()
public boolean isDirectory()
isDirectory
in interface Resource
public boolean isEditable()
Resource
isEditable
in interface Resource
public long getLastModified()
Resource
getLastModified
in interface Resource
Date.getTime()
public List<Resource> listChildren()
listChildren
in interface Resource
public InputStream openStream() throws IOException
Resource
InputStream
for this resource. Client code is expected to close the stream.openStream
in interface Resource
IOException
Resource.openReader()
public Reader openReader() throws IOException
Resource
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.openReader
in interface Resource
IOException
Resource.openStream()
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.