public class ByteFileProv extends java.lang.Object implements ByteDataProv, Debuggable
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
DEP_LIST
Class dependencies
|
protected java.io.FileInputStream |
fromFile |
protected static Logger |
log |
static java.lang.String[] |
rsrcList
Supported resource requests
|
static java.lang.String |
VERSION
Class version
|
IF_VERSION
Constructor and Description |
---|
ByteFileProv(java.lang.String rootPath) |
Modifier and Type | Method and Description |
---|---|
void |
closeRsrc()
Close the resource
|
int |
getBytes(byte[] buffer)
Get bytes from the resource.
|
boolean |
isDebugging()
Get debug state.
|
boolean |
openRsrc(java.net.URL reqUrl)
Open a resource
|
long |
rsrcLength()
Get the size of the resource.
|
void |
setDebugging(boolean debug)
Set or clear debugging
|
public static final java.lang.String VERSION
public static final java.lang.String[] DEP_LIST
public static final java.lang.String[] rsrcList
protected static Logger log
protected java.io.FileInputStream fromFile
public void setDebugging(boolean debug)
Debuggable
setDebugging
in interface Debuggable
debug
- If true, debugging is turned on,
otherwise, debugging is turned off.public boolean isDebugging()
Debuggable
isDebugging
in interface Debuggable
public boolean openRsrc(java.net.URL reqUrl)
ByteDataProv
openRsrc
in interface ByteDataProv
reqUrl
- URL for the resource to open.public void closeRsrc()
ByteDataProv
closeRsrc
in interface ByteDataProv
public long rsrcLength()
ByteDataProv
rsrcLength
in interface ByteDataProv
public int getBytes(byte[] buffer)
ByteDataProv
getBytes
in interface ByteDataProv
buffer
- Buffer to receive the bytes.