Package com.djrapitops.plan.storage.file
Class SpongeAssetResource
java.lang.Object
com.djrapitops.plan.storage.file.SpongeAssetResource
- All Implemented Interfaces:
Resource
Resource
implementation for Sponge Asset API.-
Constructor Summary
ConstructorDescriptionSpongeAssetResource(String resourceName, org.spongepowered.api.asset.Asset asset)
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.djrapitops.plan.storage.file.Resource
asParsed, asWebResource
-
Constructor Details
-
SpongeAssetResource
-
-
Method Details
-
getResourceName
Description copied from interface:Resource
Get the name of this Resource.- Specified by:
getResourceName
in interfaceResource
- Returns:
- Relative file path given to
PlanFiles
.
-
asInputStream
Description copied from interface:Resource
Get the resource as an InputStream.- Specified by:
asInputStream
in interfaceResource
- Returns:
- InputStream of the resource, not closed automatically.
- Throws:
IOException
- If the resource is unavailable.
-
asLines
Description copied from interface:Resource
Get the resource as lines.- Specified by:
asLines
in interfaceResource
- Returns:
- Lines of the resource file.
- Throws:
IOException
- If the resource is unavailable.
-
asString
Description copied from interface:Resource
Get the resource as a String with each line separated by CRLF newline characters\r\n
.- Specified by:
asString
in interfaceResource
- Returns:
- Flat string with each line separated by
\r\n
. - Throws:
IOException
- If the resource is unavailable.
-
asBytes
- Specified by:
asBytes
in interfaceResource
- Throws:
IOException
-