public interface Resource
Resource
represents any content that can be served through the ResourceHandler
.Modifier and Type | Method and Description |
---|---|
long |
getLastModified()
Returns the timestamp when the resource has been last modified (expressed in
TimeUnit.MILLISECONDS ). |
String |
getType()
Returns the media type of this resource.
|
boolean |
hasChangedSince(long sinceTime)
Returns
true if the resource has changed since the given timestamp (expressed in ms). |
InputStream |
open()
Returns a new
InputStream used to read resource's content. |
InputStream open() throws IOException
InputStream
used to read resource's content.
Note that this is the responsibility of the caller to close the stream.InputStream
IOException
- if the stream cannot be openedString getType()
long getLastModified()
TimeUnit.MILLISECONDS
).boolean hasChangedSince(long sinceTime)
true
if the resource has changed since the given timestamp (expressed in ms).sinceTime
- timestamp to compare with this resource's last modified timestamp.true
if the resource has changed since the given timestamp (expressed in ms).Copyright 2011-2017 ForgeRock AS.