org.easetech.easytest.io
Class EmptyResource

java.lang.Object
  extended by org.easetech.easytest.io.EmptyResource
All Implemented Interfaces:
Resource

public class EmptyResource
extends Object
implements Resource

An empty implementation of the resource, useful in cases where the user loads the data from Java Class and thus does not require to load a resource explicitly

Author:
Anuj Kumar

Constructor Summary
EmptyResource()
           
 
Method Summary
 boolean exists()
          Indicates whether the resource exists or not
 File getFile()
          Get the File associated with the resource
 InputStream getInputStream()
          Get the InputStream associated with the resource
 OutputStream getOutputStream()
          Get the OutputStream associated with the resource
 String getResourceName()
          Get the resource name
 URL getURL()
          get the URL associated with the resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyResource

public EmptyResource()
Method Detail

exists

public boolean exists()
Description copied from interface: Resource
Indicates whether the resource exists or not

Specified by:
exists in interface Resource
Returns:
boolean

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: Resource
Get the InputStream associated with the resource

Specified by:
getInputStream in interface Resource
Returns:
InputStream
Throws:
IOException - if an IOException occurs

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Description copied from interface: Resource
Get the OutputStream associated with the resource

Specified by:
getOutputStream in interface Resource
Returns:
OutputStream
Throws:
IOException - if an IOException occurs

getURL

public URL getURL()
Description copied from interface: Resource
get the URL associated with the resource

Specified by:
getURL in interface Resource
Returns:
URL

getFile

public File getFile()
             throws Exception
Description copied from interface: Resource
Get the File associated with the resource

Specified by:
getFile in interface Resource
Returns:
File
Throws:
Exception

getResourceName

public String getResourceName()
Description copied from interface: Resource
Get the resource name

Specified by:
getResourceName in interface Resource
Returns:
String


Copyright © 2013. All Rights Reserved.