public class LazyResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<?> |
clazz
The reference class for using correct package and class loader.
|
protected byte[] |
data
The resource, if already loaded.
|
protected java.io.IOException |
exception
The exception, if already failed.
|
protected java.lang.String |
path
The resource path (relative to clazz or absolute).
|
Constructor and Description |
---|
LazyResource(java.lang.Class<?> clazz,
java.lang.String path)
Create a lazy resource.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Get the resource contents.
|
protected java.lang.Class<?> clazz
protected java.lang.String path
protected byte[] data
protected java.io.IOException exception