Package com.ardor3d.util.resource
Interface ResourceSource
- All Superinterfaces:
Savable
- All Known Implementing Classes:
StringResourceSource
,URLResourceSource
Represents a named resource
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
getRelativeSource
(String name) Generate and return a new ResourceSource pointing to a named resource that is relative to this object's resource.getType()
Methods inherited from interface com.ardor3d.util.export.Savable
getClassTag, read, write
-
Field Details
-
UNKNOWN_TYPE
- See Also:
-
-
Method Details
-
getName
String getName()- Returns:
- the name of this resource.
-
getType
String getType()- Returns:
- the "type" of resource we are pointing to. For example ".jpg", ".dae", etc.
-
getRelativeSource
Generate and return a new ResourceSource pointing to a named resource that is relative to this object's resource.- Parameters:
name
- the name of the resource we want. eg. "./mypic.jpg" etc.- Returns:
- the relative resource, or null if none is found. Will also return null if this ResourceSource type does not support relative source.
-
openStream
- Returns:
- an InputStream to this resource's contents.
- Throws:
IOException
- if something wrong occurs while reading
-