org.ckkloverdos.resource
Class EmptyResource

java.lang.Object
  extended by org.ckkloverdos.resource.EmptyResource
All Implemented Interfaces:
IResource

public final class EmptyResource
extends java.lang.Object
implements IResource

Represents a resource that doesnot exist.

Author:
Christos KK Loverdos

Field Summary
static EmptyResource INSTANCE
           
 
Method Summary
 boolean exists()
          Returns true iff the resource exists.
 java.io.File getFile()
          Returns the resource file.
 java.io.InputStream getInputStream()
          Returns an input stream used to read the resource bytes.
 java.lang.String getName()
          Returns the resource name.
 java.net.URL getURL()
          Returns the resource URL.
 boolean isFile()
          Returns true iff the resource is actually a local file.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final EmptyResource INSTANCE
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IResource
Returns the resource name.

Specified by:
getName in interface IResource

getURL

public java.net.URL getURL()
Description copied from interface: IResource
Returns the resource URL.

Specified by:
getURL in interface IResource

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: IResource
Returns an input stream used to read the resource bytes.

Specified by:
getInputStream in interface IResource
Throws:
java.io.IOException

exists

public boolean exists()
Description copied from interface: IResource
Returns true iff the resource exists.

Specified by:
exists in interface IResource

isFile

public boolean isFile()
Description copied from interface: IResource
Returns true iff the resource is actually a local file.

Specified by:
isFile in interface IResource

getFile

public java.io.File getFile()
Description copied from interface: IResource
Returns the resource file. If IResource.isFile() returns true, then the actual file is returned, otherwise null.

Specified by:
getFile in interface IResource

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1999-2007 Christos KK Loverdos. All Rights Reserved.