|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.easetech.easytest.io.FileSystemResource
public class FileSystemResource
A FileSystem based Resource implementation.
The ResourceLoaderStrategy will auto instantiate this class if the DataLoader
annotation specifies the filePaths attribute to contain a FileSystem resource. For eg.
@DataLoader(filePahts={C:\\myComputer\\testData.csv})
| Constructor Summary | |
|---|---|
FileSystemResource(File file)
Construct a new FileSystemResource from the provided File instance |
|
FileSystemResource(String path)
Construct a new FileSystemResource from the provided simple path |
|
| Method Summary | |
|---|---|
boolean |
exists()
Identifies whether the resource represented by this instance exists or not |
File |
getFile()
Get the File object instance represented by this Resource |
InputStream |
getInputStream()
Get the input stream represented by this resource |
OutputStream |
getOutputStream()
Get the OutputStream for the given resource |
String |
getPath()
|
String |
getResourceName()
Return the name of the resource |
URL |
getURL()
Gwet the URL represented by this resource |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileSystemResource(String path)
path - the path where the file system resource residespublic FileSystemResource(File file)
file - representing the file system resource| Method Detail |
|---|
public String getPath()
public boolean exists()
exists in interface Resourcepublic InputStream getInputStream()
getInputStream in interface ResourceInputStreampublic URL getURL()
getURL in interface Resourcepublic File getFile()
getFile in interface Resourcepublic String getResourceName()
getResourceName in interface Resourcepublic OutputStream getOutputStream()
OutputStream for the given resource
getOutputStream in interface ResourceOutputStreampublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||