Class Resource
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public abstract class Resource implements AutoCloseable
Abstract representation of a resource. This is used to lazily load resources.
-
-
Field Summary
Fields Modifier and Type Field Description private final transient Booleaninitprivate final InputStreamstreamprivate final StringresourcePath
-
Method Summary
Modifier and Type Method Description final BooleangetInit()final InputStreamgetStream()final StringgetResourcePath()final InputStreamget()final Unitreset()Unitclose()final UnitgetAsync(Function1<Throwable, Unit> exceptionHandler, Function1<InputStream, Unit> callback)final UnitgetAsyncNullable(Function1<Throwable, Unit> exceptionHandler, Function1<InputStream, Unit> callback)StringtoString()IntegerhashCode()Booleanequals(Object other)-
-
Constructor Detail
-
Resource
Resource(String resourcePath)
-
-
Method Detail
-
getStream
final InputStream getStream()
-
getResourcePath
final String getResourcePath()
-
get
final InputStream get()
-
getAsync
@ApiStatus.Experimental() final Unit getAsync(Function1<Throwable, Unit> exceptionHandler, Function1<InputStream, Unit> callback)
-
getAsyncNullable
@ApiStatus.Experimental() final Unit getAsyncNullable(Function1<Throwable, Unit> exceptionHandler, Function1<InputStream, Unit> callback)
-
-
-
-