Package jadex.commons
Class LazyResource
- java.lang.Object
-
- jadex.commons.LazyResource
-
public class LazyResource extends java.lang.Object
Representation of data loaded on first access. Used, e.g., for component type icons.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description LazyResource(java.lang.Class<?> clazz, java.lang.String path)
Create a lazy resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
Get the resource contents.
-
-
-
Field Detail
-
clazz
protected java.lang.Class<?> clazz
The reference class for using correct package and class loader.
-
path
protected java.lang.String path
The resource path (relative to clazz or absolute).
-
data
protected byte[] data
The resource, if already loaded.
-
exception
protected java.io.IOException exception
The exception, if already failed.
-
-