public class ByteFileProv extends java.lang.Object implements ByteDataProv
This provider returns files as byte streams. The actual data type of the file doesn't matter.
| 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
|
void |
quiesce()
Stop accepting new requests and release resources.
|
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)
DebuggablesetDebugging in interface Debuggabledebug - If true, debugging is turned on,
otherwise, debugging is turned off.public boolean isDebugging()
DebuggableisDebugging in interface Debuggablepublic boolean openRsrc(java.net.URL reqUrl)
ByteDataProvopenRsrc in interface ByteDataProvreqUrl - URL for the resource to open.public void closeRsrc()
ByteDataProvcloseRsrc in interface ByteDataProvpublic long rsrcLength()
ByteDataProvrsrcLength in interface ByteDataProvpublic int getBytes(byte[] buffer)
ByteDataProvgetBytes in interface ByteDataProvbuffer - Buffer to receive the bytes.