public class FileResource extends AbstractResource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCRIPTION |
static java.lang.String |
NAME |
lock, multiResourcelock
Constructor and Description |
---|
FileResource(FileResourceParameters params) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get()
Returns the real resource represented by this object.
|
java.io.File |
getFile() |
java.io.FileInputStream |
getFileInputStream() |
java.lang.String |
getFileName() |
java.lang.String |
getName()
Returns the name of the
Resource . |
boolean |
isThis(ResourceParameters parameters) |
addConsumer, addObserver, addObservers, closeRequest, deleteObserver, deleteObservers, execute, executeBegins, executeEnds, getConsumerAt, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getParameters, inUse, isOpen, notifyChanges, notifyClose, notifyDispose, notifyObserver, notifyOpen, openCount, performExecution, prepare, prepare, removeConsumer, setData, updateLastTimeOpen, updateLastTimeUsed
public static final java.lang.String NAME
public static final java.lang.String DESCRIPTION
public FileResource(FileResourceParameters params) throws InitializeException
InitializeException
public java.lang.Object get() throws AccessResourceException
AbstractResource
get
in interface Resource
get
in class AbstractResource
AccessResourceException
- if there is an error while accessing the resourcepublic java.lang.String getFileName() throws AccessResourceException
AccessResourceException
public java.io.File getFile() throws AccessResourceException
AccessResourceException
public java.io.FileInputStream getFileInputStream() throws AccessResourceException, java.io.FileNotFoundException
AccessResourceException
java.io.FileNotFoundException
public java.lang.String getName() throws AccessResourceException
AbstractResource
Resource
.getName
in interface Resource
getName
in class AbstractResource
AccessResourceException
- if there is an error while accessing the resourcepublic boolean isThis(ResourceParameters parameters) throws ResourceException
ResourceException