Package nz.org.riskscape.engine.resource
Class Resource.PseudoResource
java.lang.Object
nz.org.riskscape.engine.resource.Resource.PseudoResource
- All Implemented Interfaces:
Resource
- Enclosing interface:
- Resource
A resource that can not be opened but is still useful for identifying some content. Useful to use as a resource for plugin added resources.
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.resource.Resource
Resource.Options, Resource.PseudoResource
-
Field Summary
Fields inherited from interface nz.org.riskscape.engine.resource.Resource
NO_BYTES, SECURE_OPTIONS, UNKNOWN, UNKNOWN_URI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Return anInputStream
to the underlying resource.int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.resource.Resource
ensureLocal, getContentAsString, getContentReader, getMediaType
-
Constructor Details
-
PseudoResource
-
-
Method Details
-
getContentStream
Description copied from interface:Resource
Return an
InputStream
to the underlying resource.Each call should return a freshly created input stream.
- Specified by:
getContentStream
in interfaceResource
- Returns:
- the input stream for the underlying resource.
- Throws:
RiskscapeIOException
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getLocation
- Specified by:
getLocation
in interfaceResource
- Returns:
- a
URI
identifying where this resource is located
-