net.sf.fikin.ant.types
Class Input

java.lang.Object
  extended by net.sf.fikin.ant.types.Input
All Implemented Interfaces:
Type
Direct Known Subclasses:
XMLInput

public class Input
extends java.lang.Object
implements Type

Implement a genuin input type

Support file, property or nested text as an input

Provides with convenience methods for readin the data as input stream and such created on Jan 3, 2007

Since:
Version:
$Revision: 1.3 $
Author:
fiykov

Constructor Summary
Input()
           
 
Method Summary
 void addText(java.lang.String text)
          set nested tag's text
 void check(org.apache.tools.ant.Task task)
          test that any of the members has been set test if too many members have been set test if file is existing
 java.io.InputStream getInputStream(org.apache.tools.ant.Task task)
          get a input stream object for the input
 java.io.Reader getReader(org.apache.tools.ant.Task task)
          get a reader object for the input
 void setFile(java.io.File in)
          set input file
 void setProperty(java.lang.String propertyName)
          set input property name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Input

public Input()
Method Detail

setFile

public void setFile(java.io.File in)
set input file

Parameters:
in - is input file
Ant Task Param Required:
this or property or inner text must be given

setProperty

public void setProperty(java.lang.String propertyName)
set input property name

Parameters:
propertyName -
Ant Task Param Required:
this or file or inner text must be given

addText

public void addText(java.lang.String text)
set nested tag's text

Parameters:
text -
Ant Task Param Required:
this or property or file must be given

check

public void check(org.apache.tools.ant.Task task)
           throws org.apache.tools.ant.BuildException
test that any of the members has been set test if too many members have been set test if file is existing

Specified by:
check in interface Type
Parameters:
task - is enclosing ant task
Throws:
org.apache.tools.ant.BuildException

getReader

public java.io.Reader getReader(org.apache.tools.ant.Task task)
                         throws org.apache.tools.ant.BuildException
get a reader object for the input

Parameters:
task - enclosing task
Returns:
Reader object for that input
Throws:
org.apache.tools.ant.BuildException - in case some internal error occured

getInputStream

public java.io.InputStream getInputStream(org.apache.tools.ant.Task task)
                                   throws org.apache.tools.ant.BuildException
get a input stream object for the input

Parameters:
task - enclosing task
Returns:
InputStream object for that input
Throws:
org.apache.tools.ant.BuildException - in case some internal error occured


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.