org.apache.tools.ant.taskdefs

Class LoadResource

public class LoadResource extends Task

Load a resource into a property

Since: Ant 1.7

UNKNOWN: category="utility"

Method Summary
voidaddConfigured(ResourceCollection a)
Set the source resource.
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.
voidsetQuiet(boolean quiet)
If true, suppress the load error report and set the the failonerror value to false.

Method Detail

addConfigured

public void addConfigured(ResourceCollection a)
Set the source resource.

Parameters: a the resource to load as a single element Resource collection.

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/j2se/1.5.0/docs/guide/intl/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

setQuiet

public void setQuiet(boolean quiet)
If true, suppress the load error report and set the the failonerror value to false.

Parameters: quiet The new Quiet value