org.apache.tools.ant.taskdefs

Class LoadFile

public class LoadFile extends Task

Load a file into a property

Since: Ant 1.5

UNKNOWN: category="utility"

Method Summary
voidaddFilterChain(FilterChain filter)
Add the FilterChain element.
voidexecute()
read in a source file to a property
voidsetEncoding(String encoding)
Encoding to use for input, defaults to the platform's default encoding.
voidsetFailonerror(boolean fail)
If true, fail on load error.
voidsetProperty(String property)
Property name to save to.
voidsetSrcFile(File srcFile)
Sets the file to load.

Method Detail

addFilterChain

public final void addFilterChain(FilterChain filter)
Add the FilterChain element.

Parameters: filter the filter to add

execute

public final void execute()
read in a source file to a property

Throws: BuildException if something goes wrong with the build

setEncoding

public final void setEncoding(String encoding)
Encoding to use for input, defaults to the platform's default encoding.

For a list of possible values see http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html .

Parameters: encoding The new Encoding value

setFailonerror

public final void setFailonerror(boolean fail)
If true, fail on load error.

Parameters: fail The new Failonerror value

setProperty

public final void setProperty(String property)
Property name to save to.

Parameters: property The new Property value

setSrcFile

public final void setSrcFile(File srcFile)
Sets the file to load.

Parameters: srcFile The new SrcFile value

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.