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 theInputStreamof 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:
closein interfaceAutoCloseable- Throws:
IOException
-