Edit C:\apache-ant-1.8.0\docs\manual\api\org\apache\tools\ant\taskdefs\optional\EchoProperties.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_22) on Mon Feb 01 19:35:43 EST 2010 --> <TITLE> EchoProperties (Apache Ant API) </TITLE> <META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.optional.EchoProperties class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="EchoProperties (Apache Ant API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/Cab.html" title="class in org.apache.tools.ant.taskdefs.optional"><B>PREV CLASS</B></A> <A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.FormatAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/tools/ant/taskdefs/optional/EchoProperties.html" target="_top"><B>FRAMES</B></A> <A HREF="EchoProperties.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.tools.ant.taskdefs.optional</FONT> <BR> Class EchoProperties</H2> <PRE> java.lang.Object <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">org.apache.tools.ant.ProjectComponent</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">org.apache.tools.ant.Task</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.taskdefs.optional.EchoProperties</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable</DD> </DL> <HR> <DL> <DT><PRE>public class <B>EchoProperties</B><DT>extends <A HREF="../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></DL> </PRE> <P> Displays all the current properties in the build. The output can be sent to a file if desired. <P> Attribute "destfile" defines a file to send the properties to. This can be processed as a standard property file later. <P> Attribute "prefix" defines a prefix which is used to filter the properties only those properties starting with this prefix will be echoed. <P> By default, the "failonerror" attribute is enabled. If an error occurs while writing the properties to a file, and this attribute is enabled, then a BuildException will be thrown. If disabled, then IO errors will be reported as a log statement, but no error will be thrown. <P> Examples: <pre> <echoproperties /> </pre> Report the current properties to the log. <P> <pre> <echoproperties destfile="my.properties" /> </pre> Report the current properties to the file "my.properties", and will fail the build if the file could not be created or written to. <P> <pre> <echoproperties destfile="my.properties" failonerror="false" prefix="ant" /> </pre> Report all properties beginning with 'ant' to the file "my.properties", and will log a message if the file could not be created or written to, but will still allow the build to continue. <P> <P> <DL> <DT><B>Since:</B></DT> <DD>Ant 1.5</DD> </DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.FormatAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional">EchoProperties.FormatAttribute</A></B></CODE> <BR> A enumerated type for the format attribute.</TD> </TR> </TABLE> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../../org/apache/tools/ant/Task.html#target">target</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#taskName">taskName</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#taskType">taskType</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#wrapper">wrapper</A></CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#description">description</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#location">location</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#project">project</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#EchoProperties()">EchoProperties</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#addPropertyset(org.apache.tools.ant.types.PropertySet)">addPropertyset</A></B>(<A HREF="../../../../../../org/apache/tools/ant/types/PropertySet.html" title="class in org.apache.tools.ant.types">PropertySet</A> ps)</CODE> <BR> A set of properties to write.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#execute()">execute</A></B>()</CODE> <BR> Run the task.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#jdkSaveProperties(java.util.Properties, java.io.OutputStream, java.lang.String)">jdkSaveProperties</A></B>(java.util.Properties props, java.io.OutputStream os, java.lang.String header)</CODE> <BR> JDK 1.2 allows for the safer method <tt>Properties.store(OutputStream, String)</tt>, which throws an <tt>IOException</tt> on an output error.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#saveProperties(java.util.Hashtable, java.io.OutputStream)">saveProperties</A></B>(java.util.Hashtable allProps, java.io.OutputStream os)</CODE> <BR> Send the key/value pairs in the hashtable to the given output stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#setDestfile(java.io.File)">setDestfile</A></B>(java.io.File destfile)</CODE> <BR> Set a file to store the property output.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#setFailOnError(boolean)">setFailOnError</A></B>(boolean failonerror)</CODE> <BR> If true, the task will fail if an error occurs writing the properties file, otherwise errors are just logged.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#setFormat(org.apache.tools.ant.taskdefs.optional.EchoProperties.FormatAttribute)">setFormat</A></B>(<A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.FormatAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional">EchoProperties.FormatAttribute</A> ea)</CODE> <BR> Set the output format - xml or text.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#setPrefix(java.lang.String)">setPrefix</A></B>(java.lang.String prefix)</CODE> <BR> If the prefix is set, then only properties which start with this prefix string will be recorded.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#setRegex(java.lang.String)">setRegex</A></B>(java.lang.String regex)</CODE> <BR> If the regex is set, then only properties whose names match it will be recorded.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#setSrcfile(java.io.File)">setSrcfile</A></B>(java.io.File file)</CODE> <BR> Sets the input file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.html#xmlSaveProperties(java.util.Properties, java.io.OutputStream)">xmlSaveProperties</A></B>(java.util.Properties props, java.io.OutputStream os)</CODE> <BR> Output the properties as xml output.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../../org/apache/tools/ant/Task.html#bindToOwner(org.apache.tools.ant.Task)">bindToOwner</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#getOwningTarget()">getOwningTarget</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#getRuntimeConfigurableWrapper()">getRuntimeConfigurableWrapper</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#getTaskName()">getTaskName</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#getTaskType()">getTaskType</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#getWrapper()">getWrapper</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#handleErrorFlush(java.lang.String)">handleErrorFlush</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#handleErrorOutput(java.lang.String)">handleErrorOutput</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#handleFlush(java.lang.String)">handleFlush</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)">handleInput</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#handleOutput(java.lang.String)">handleOutput</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#init()">init</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#isInvalid()">isInvalid</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#log(java.lang.String)">log</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, int)">log</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, java.lang.Throwable, int)">log</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#log(java.lang.Throwable, int)">log</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#maybeConfigure()">maybeConfigure</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#perform()">perform</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#reconfigure()">reconfigure</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#setOwningTarget(org.apache.tools.ant.Target)">setOwningTarget</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable)">setRuntimeConfigurableWrapper</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#setTaskName(java.lang.String)">setTaskName</A>, <A HREF="../../../../../../org/apache/tools/ant/Task.html#setTaskType(java.lang.String)">setTaskType</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#clone()">clone</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#getDescription()">getDescription</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#getLocation()">getLocation</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#getProject()">getProject</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#setLocation(org.apache.tools.ant.Location)">setLocation</A>, <A HREF="../../../../../../org/apache/tools/ant/ProjectComponent.html#setProject(org.apache.tools.ant.Project)">setProject</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="EchoProperties()"><!-- --></A><H3> EchoProperties</H3> <PRE> public <B>EchoProperties</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="setSrcfile(java.io.File)"><!-- --></A><H3> setSrcfile</H3> <PRE> public void <B>setSrcfile</B>(java.io.File file)</PRE> <DL> <DD>Sets the input file. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the input file</DL> </DD> </DL> <HR> <A NAME="setDestfile(java.io.File)"><!-- --></A><H3> setDestfile</H3> <PRE> public void <B>setDestfile</B>(java.io.File destfile)</PRE> <DL> <DD>Set a file to store the property output. If this is never specified, then the output will be sent to the Ant log. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>destfile</CODE> - file to store the property output</DL> </DD> </DL> <HR> <A NAME="setFailOnError(boolean)"><!-- --></A><H3> setFailOnError</H3> <PRE> public void <B>setFailOnError</B>(boolean failonerror)</PRE> <DL> <DD>If true, the task will fail if an error occurs writing the properties file, otherwise errors are just logged. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>failonerror</CODE> - <tt>true</tt> if IO exceptions are reported as build exceptions, or <tt>false</tt> if IO exceptions are ignored.</DL> </DD> </DL> <HR> <A NAME="setPrefix(java.lang.String)"><!-- --></A><H3> setPrefix</H3> <PRE> public void <B>setPrefix</B>(java.lang.String prefix)</PRE> <DL> <DD>If the prefix is set, then only properties which start with this prefix string will be recorded. If regex is not set and if this is never set, or it is set to an empty string or <tt>null</tt>, then all properties will be recorded. <P> For example, if the attribute is set as: <PRE><echoproperties prefix="ant." /></PRE> then the property "ant.home" will be recorded, but "ant-example" will not. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>prefix</CODE> - The new prefix value</DL> </DD> </DL> <HR> <A NAME="setRegex(java.lang.String)"><!-- --></A><H3> setRegex</H3> <PRE> public void <B>setRegex</B>(java.lang.String regex)</PRE> <DL> <DD>If the regex is set, then only properties whose names match it will be recorded. If prefix is not set and if this is never set, or it is set to an empty string or <tt>null</tt>, then all properties will be recorded.<P> For example, if the attribute is set as: <PRE><echoproperties prefix=".*ant.*" /></PRE> then the properties "ant.home" and "user.variant" will be recorded, but "ant-example" will not. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>regex</CODE> - The new regex value<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="addPropertyset(org.apache.tools.ant.types.PropertySet)"><!-- --></A><H3> addPropertyset</H3> <PRE> public void <B>addPropertyset</B>(<A HREF="../../../../../../org/apache/tools/ant/types/PropertySet.html" title="class in org.apache.tools.ant.types">PropertySet</A> ps)</PRE> <DL> <DD>A set of properties to write. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ps</CODE> - the property set to write<DT><B>Since:</B></DT> <DD>Ant 1.6</DD> </DL> </DD> </DL> <HR> <A NAME="setFormat(org.apache.tools.ant.taskdefs.optional.EchoProperties.FormatAttribute)"><!-- --></A><H3> setFormat</H3> <PRE> public void <B>setFormat</B>(<A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.FormatAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional">EchoProperties.FormatAttribute</A> ea)</PRE> <DL> <DD>Set the output format - xml or text. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ea</CODE> - an enumerated <code>FormatAttribute</code> value</DL> </DD> </DL> <HR> <A NAME="execute()"><!-- --></A><H3> execute</H3> <PRE> public void <B>execute</B>() throws <A HREF="../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE> <DL> <DD>Run the task. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/tools/ant/Task.html#execute()">execute</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - trouble, probably file IO</DL> </DD> </DL> <HR> <A NAME="saveProperties(java.util.Hashtable, java.io.OutputStream)"><!-- --></A><H3> saveProperties</H3> <PRE> protected void <B>saveProperties</B>(java.util.Hashtable allProps, java.io.OutputStream os) throws java.io.IOException, <A HREF="../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE> <DL> <DD>Send the key/value pairs in the hashtable to the given output stream. Only those properties matching the <tt>prefix</tt> constraint will be sent to the output stream. The output stream will be closed when this method returns. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>allProps</CODE> - propfile to save<DD><CODE>os</CODE> - output stream <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - on output errors <DD><CODE><A HREF="../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on other errors</DL> </DD> </DL> <HR> <A NAME="xmlSaveProperties(java.util.Properties, java.io.OutputStream)"><!-- --></A><H3> xmlSaveProperties</H3> <PRE> protected void <B>xmlSaveProperties</B>(java.util.Properties props, java.io.OutputStream os) throws java.io.IOException</PRE> <DL> <DD>Output the properties as xml output. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>props</CODE> - the properties to save<DD><CODE>os</CODE> - the output stream to write to (Note this gets closed) <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - on error in writing to the stream</DL> </DD> </DL> <HR> <A NAME="jdkSaveProperties(java.util.Properties, java.io.OutputStream, java.lang.String)"><!-- --></A><H3> jdkSaveProperties</H3> <PRE> protected void <B>jdkSaveProperties</B>(java.util.Properties props, java.io.OutputStream os, java.lang.String header) throws java.io.IOException</PRE> <DL> <DD>JDK 1.2 allows for the safer method <tt>Properties.store(OutputStream, String)</tt>, which throws an <tt>IOException</tt> on an output error. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>props</CODE> - the properties to record<DD><CODE>os</CODE> - record the properties to this output stream<DD><CODE>header</CODE> - prepend this header to the property output <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - on an I/O error during a write.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/Cab.html" title="class in org.apache.tools.ant.taskdefs.optional"><B>PREV CLASS</B></A> <A HREF="../../../../../../org/apache/tools/ant/taskdefs/optional/EchoProperties.FormatAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/tools/ant/taskdefs/optional/EchoProperties.html" target="_top"><B>FRAMES</B></A> <A HREF="EchoProperties.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de