public abstract class ResourceBase extends Object implements Resource
| Constructor and Description |
|---|
ResourceBase(ResourceKey key) |
| Modifier and Type | Method and Description |
|---|---|
ResourceKey |
getKey() |
protected RuntimeException |
handleError(IOException e) |
Reader |
openReader() |
InputStream |
openStream() |
byte[] |
readBytes() |
List<String> |
readLines() |
String |
readString() |
void |
requireExists() |
public ResourceBase(ResourceKey key)
public final ResourceKey getKey()
public final InputStream openStream()
openStream in interface Resourcepublic final Reader openReader()
openReader in interface Resourcepublic final void requireExists()
requireExists in interface Resourcepublic final String readString()
readString in interface Resourceprotected final RuntimeException handleError(IOException e)