Resources

open class Resources

Contains utilities to load script resources

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Exception thrown when a resource is not found

Functions

Link copied to clipboard
open fun getBytes(name: String): Array<Byte>
Gets the bytes of a resource with the specified name
Link copied to clipboard
open fun getCssPath(name: String): String
Gets a string path to a css file to be used with javafx.
Link copied to clipboard
open fun getImage(name: String): BufferedImage
Parses the specified resource with the specified name as an image
Link copied to clipboard
open fun getJson(name: String): JsonElement
Parses the specified resource with the specified name as a json file
open fun <T> getJson(name: String, type: Class<T>): T
Parses the specified resource with the specified name as a json file with the specified type
Link copied to clipboard
Parses the specified resource with the specified name as a properties file
Link copied to clipboard
open fun getStream(name: String): InputStream
Gets an input stream to a resource with the specified name
Link copied to clipboard
open fun getString(name: String): String
Gets the resource with the specified name as a string