Web Site

org.codehaus.janino.util.resource
Class ResourceFinder.FileResource

java.lang.Object
  extended byorg.codehaus.janino.util.resource.ResourceFinder.FileResource
All Implemented Interfaces:
ResourceFinder.Resource
Enclosing class:
ResourceFinder

public static class ResourceFinder.FileResource
extends Object
implements ResourceFinder.Resource

Representation of a resource that is a File.


Constructor Summary
ResourceFinder.FileResource(File file)
           
 
Method Summary
 File getFile()
           
 String getFileName()
          Returns a decorative "file name" that can be used for reporting errors and the like.
 InputStream open()
          Opens the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFinder.FileResource

public ResourceFinder.FileResource(File file)
Method Detail

getFileName

public String getFileName()
Description copied from interface: ResourceFinder.Resource
Returns a decorative "file name" that can be used for reporting errors and the like. It does not necessarily map to a file in the local file system!

Specified by:
getFileName in interface ResourceFinder.Resource

open

public InputStream open()
                 throws IOException
Description copied from interface: ResourceFinder.Resource
Opens the resource. The caller is responsible for closing the InputStream.

Specified by:
open in interface ResourceFinder.Resource
Throws:
IOException

getFile

public File getFile()

Web Site