org.xfp.filters.file
Class FileReader

java.lang.Object
  extended byorg.xfp.AttributeContainer
      extended byorg.xfp.Filter
          extended byorg.xfp.filters.file.FileReader

public class FileReader
extends Filter

Reads from a file.

Version:
$Id: FileReader.java,v 1.1 2004/03/19 15:56:45 flaviotordini Exp $
Author:
Flavio Tordini

Nested Class Summary
 
Nested classes inherited from class org.xfp.Filter
Filter.OnErrorEnum, Filter.OnLoopErrorEnum
 
Field Summary
 
Fields inherited from class org.xfp.AttributeContainer
name, parentContainer
 
Constructor Summary
FileReader()
           
 
Method Summary
 java.io.InputStream execute()
           
 java.io.InputStream execute(java.io.File file)
           
 java.io.InputStream execute(java.lang.String filename)
           
 void reset()
          Resets filter status after execution.
 void setFilename(java.lang.String filename)
          Sets the name of the file to read from.
 
Methods inherited from class org.xfp.Filter
getOnError, initialize, log, newInstance, perform, toString
 
Methods inherited from class org.xfp.AttributeContainer
configureAttributes, disposeAttributes, getAttributes, getFullName, getName, initializeAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileReader

public FileReader()
Method Detail

execute

public java.io.InputStream execute()
                            throws java.lang.Exception
Throws:
java.lang.Exception

execute

public java.io.InputStream execute(java.lang.String filename)
                            throws java.lang.Exception
Throws:
java.lang.Exception

execute

public java.io.InputStream execute(java.io.File file)
                            throws java.lang.Exception
Throws:
java.lang.Exception

reset

public void reset()
Description copied from class: Filter
Resets filter status after execution. This method is called after execute(), even in case of exceptions. Since a Filter instance may be reused (and actually is), you must use this method to reset all your class members to their default value.

Specified by:
reset in class Filter
See Also:
Filter.reset()

setFilename

public void setFilename(java.lang.String filename)
Sets the name of the file to read from.

Parameters:
filename - The name of the file


Copyright © 2003-2004 XFP Team. All Rights Reserved.