ResourceReader

public abstract class ResourceReader extends Resource implements AutoCloseable(source)

A base class for reading resources.

Parameters

id

The identifier of the resource

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
private final InputStream inputStream

Returns the input steam of the resource.

Inherited properties

Link copied to clipboard
private final Identifier id
Link copied to clipboard
private final String resourcePack

Returns the name of the resource pack the current resource is loaded from.

Functions

Link copied to clipboard
public abstract InputStream getInputStream()

Returns the input steam of the resource.

Inherited functions

Link copied to clipboard
public abstract Unit close()
Link copied to clipboard
public abstract Boolean exists()

Returns if the current resource exists.

Link copied to clipboard
public final Identifier getId()
Link copied to clipboard
public abstract String getResourcePack()

Returns the name of the resource pack the current resource is loaded from.