public class BaseInputStreamLocator extends Object implements InputStreamLocator
Modifier and Type | Field and Description |
---|---|
private Map<String,File> |
cache |
private DbControl |
dc |
private Directory |
dir |
Constructor and Description |
---|
BaseInputStreamLocator(DbControl dc,
Directory dir)
Create a new input stream locator.
|
Modifier and Type | Method and Description |
---|---|
private File |
getFile(String filename) |
InputStream |
getInputStream(String filename)
Finds and opens an input stream to the file with the given filename.
|
long |
getSize(String filename)
Get the size in bytes of the given named resource.
|
public InputStream getInputStream(String filename) throws IOException
getInputStream
in interface InputStreamLocator
filename
- The name (for example a file name) of the resourceIOException
- If there is any problem with locating or opening
the resourcepublic long getSize(String filename)
InputStreamLocator
getSize
in interface InputStreamLocator
filename
- The name (for example a file name) of the resouce