ua.gradsoft.termware.termloaders
Class FileInputStreamSource

java.lang.Object
  extended by ua.gradsoft.termware.termloaders.FileInputStreamSource
All Implemented Interfaces:
InputStreamSource

public class FileInputStreamSource
extends Object
implements InputStreamSource

Input stream source for file system.

Author:
Ruslan Shevchenko

Constructor Summary
FileInputStreamSource(File file, String resourceName)
          Creates a new instance of FileInputStreamSource
 
Method Summary
 InputStream getInputStream()
          create input stream for file found.
 String getResourceName()
          get absolute path of file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileInputStreamSource

public FileInputStreamSource(File file,
                             String resourceName)
Creates a new instance of FileInputStreamSource

Parameters:
file - file to open.
resourceName - - name of resource, which refered from debug entries. (usially - path relative to som systems)
Method Detail

getInputStream

public InputStream getInputStream()
                           throws ExternalException
create input stream for file found.

Specified by:
getInputStream in interface InputStreamSource
Throws:
ExternalException

getResourceName

public String getResourceName()
get absolute path of file.

Specified by:
getResourceName in interface InputStreamSource