Package org.spongepowered.api.resource
Interface Resource
- All Superinterfaces:
AutoCloseable
A resource can represent any kind of loaded data. It can be a file on the
filesystem, a network location, or even generated at runtime. Use
inputStream()
to retrieve the data.-
Method Summary
-
Method Details
-
path
ResourcePath path()- Returns:
- The
path
-
inputStream
InputStream inputStream()Returns theInputStream
of this resource. Multiple calls to this method will not return a new object. To get a new object, get a new resource.- Returns:
- The input stream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-