Resources

public class Resources

Contains utilities to load script resources

Types

ResourceNotFoundException
Link copied to clipboard
public class ResourceNotFoundException extends RuntimeException
Exception thrown when a resource is not found

Functions

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