|
Drools :: Core 6.0.0.Beta5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.core.io.impl.BaseResource
org.drools.core.io.impl.FileSystemResource
public class FileSystemResource
Borrowed gratuitously from Spring under ASL2.0.
| Constructor Summary | |
|---|---|
FileSystemResource()
|
|
FileSystemResource(File file)
Create a new FileSystemResource from a File handle. |
|
FileSystemResource(String path)
Create a new FileSystemResource from a file path. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
|
File |
getFile()
|
InputStream |
getInputStream()
This implementation opens a FileInputStream for the underlying file. |
long |
getLastModified()
|
long |
getLastRead()
|
Reader |
getReader()
|
URL |
getURL()
This implementation returns a URL for the underlying file. |
int |
hashCode()
|
boolean |
hasURL()
|
boolean |
isDirectory()
|
Collection<org.kie.api.io.Resource> |
listResources()
|
void |
readExternal(ObjectInput in)
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.drools.core.io.impl.BaseResource |
|---|
addCategory, getCategories, getConfiguration, getDescription, getResourceType, getSourcePath, getTargetPath, setCategories, setConfiguration, setDescription, setResourceType, setSourcePath, setTargetPath |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.drools.core.io.internal.InternalResource |
|---|
addCategory, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceType |
| Methods inherited from interface org.kie.api.io.Resource |
|---|
getSourcePath, getTargetPath, setSourcePath, setTargetPath |
| Constructor Detail |
|---|
public FileSystemResource()
public FileSystemResource(File file)
Note: When building relative resources via #createRelative,
the relative path will apply at the same directory level:
e.g. new File("C:/dir1"), relative path "dir2" -> "C:/dir2"!
If you prefer to have relative paths built underneath the given root
directory, use the constructor with a file path
to append a trailing slash to the root path: "C:/dir1/", which
indicates this directory as root for all relative paths.
file - a File handlepublic FileSystemResource(String path)
Note: When building relative resources via #createRelative,
it makes a difference whether the specified resource base path here
ends with a slash or not. In the case of "C:/dir1/", relative paths
will be built underneath that root: e.g. relative path "dir2" ->
"C:/dir1/dir2". In the case of "C:/dir1", relative paths will apply
at the same directory level: relative path "dir2" -> "C:/dir2".
path - a file path| Method Detail |
|---|
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class BaseResourceIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class BaseResourceIOException
ClassNotFoundException
public InputStream getInputStream()
throws IOException
getInputStream in interface org.kie.api.io.ResourceIOExceptionFileInputStream
public Reader getReader()
throws IOException
getReader in interface org.kie.api.io.ResourceIOExceptionpublic File getFile()
public boolean isDirectory()
isDirectory in interface InternalResourcepublic Collection<org.kie.api.io.Resource> listResources()
listResources in interface InternalResource
public URL getURL()
throws IOException
getURL in interface InternalResourceIOExceptionFile.toURI()public boolean hasURL()
hasURL in interface InternalResourcepublic long getLastModified()
getLastModified in interface InternalResourcepublic long getLastRead()
getLastRead in interface InternalResourcepublic String toString()
toString in class BaseResourcepublic boolean equals(Object object)
equals in class BaseResourcepublic int hashCode()
hashCode in class BaseResource
|
Drools :: Core 6.0.0.Beta5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||