Subversion Repositories bacoAlunos

Rev

Blame | Last modification | View Log | RSS feed

<!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_09) on Thu Nov 02 11:46:40 EST 2006 -->
<TITLE>
IniFile (Ant Contrib)
</TITLE>

<META NAME="keywords" CONTENT="net.sf.antcontrib.inifile.IniFile class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="IniFile (Ant Contrib)";
}
</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../net/sf/antcontrib/inifile/IniFileTask.html" title="class in net.sf.antcontrib.inifile"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/antcontrib/inifile/IniFile.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="IniFile.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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">
net.sf.antcontrib.inifile</FONT>
<BR>
Class IniFile</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.antcontrib.inifile.IniFile</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>IniFile</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
Class representing a windows style .ini file.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD><a href='mailto:mattinger@yahoo.com'>Matthew Inger</a></DD>
</DL>
<HR>

<P>

<!-- ======== 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="../../../../net/sf/antcontrib/inifile/IniFile.html#IniFile()">IniFile</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new IniFile object</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#getProperty(java.lang.String, java.lang.String)">getProperty</A></B>(java.lang.String&nbsp;section,
            java.lang.String&nbsp;property)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a named property from a specific section</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/antcontrib/inifile/IniSection.html" title="class in net.sf.antcontrib.inifile">IniSection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#getSection(java.lang.String)">getSection</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the IniSection with the given name</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#getSections()">getSections</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the List of IniSection objects contained in this IniFile</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#read(java.io.Reader)">read</A></B>(java.io.Reader&nbsp;reader)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads from a Reader into the current IniFile instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#removeProperty(java.lang.String, java.lang.String)">removeProperty</A></B>(java.lang.String&nbsp;section,
               java.lang.String&nbsp;property)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a property from a section.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#removeSection(java.lang.String)">removeSection</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an entire section from the IniFile</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#setProperty(java.lang.String, java.lang.String, java.lang.String)">setProperty</A></B>(java.lang.String&nbsp;section,
            java.lang.String&nbsp;property,
            java.lang.String&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of a property in a given section.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#setSection(net.sf.antcontrib.inifile.IniSection)">setSection</A></B>(<A HREF="../../../../net/sf/antcontrib/inifile/IniSection.html" title="class in net.sf.antcontrib.inifile">IniSection</A>&nbsp;section)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets an IniSection object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/antcontrib/inifile/IniFile.html#write(java.io.Writer)">write</A></B>(java.io.Writer&nbsp;writer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the current iniFile instance to a Writer object for
 serialization.</TD>
</TR>
</TABLE>
&nbsp;<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>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<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="IniFile()"><!-- --></A><H3>
IniFile</H3>
<PRE>
public <B>IniFile</B>()</PRE>
<DL>
<DD>Create a new IniFile object
<P>
</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="getSections()"><!-- --></A><H3>
getSections</H3>
<PRE>
public java.util.List <B>getSections</B>()</PRE>
<DL>
<DD>Gets the List of IniSection objects contained in this IniFile
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a List of IniSection objects</DL>
</DD>
</DL>
<HR>

<A NAME="getSection(java.lang.String)"><!-- --></A><H3>
getSection</H3>
<PRE>
public <A HREF="../../../../net/sf/antcontrib/inifile/IniSection.html" title="class in net.sf.antcontrib.inifile">IniSection</A> <B>getSection</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Gets the IniSection with the given name
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the section</DL>
</DD>
</DL>
<HR>

<A NAME="setSection(net.sf.antcontrib.inifile.IniSection)"><!-- --></A><H3>
setSection</H3>
<PRE>
public void <B>setSection</B>(<A HREF="../../../../net/sf/antcontrib/inifile/IniSection.html" title="class in net.sf.antcontrib.inifile">IniSection</A>&nbsp;section)</PRE>
<DL>
<DD>Sets an IniSection object.  If a section with the given
 name already exists, it is replaced with the passed in section.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>section</CODE> - The section to set.</DL>
</DD>
</DL>
<HR>

<A NAME="removeSection(java.lang.String)"><!-- --></A><H3>
removeSection</H3>
<PRE>
public void <B>removeSection</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Removes an entire section from the IniFile
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the section to remove</DL>
</DD>
</DL>
<HR>

<A NAME="getProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>
getProperty</H3>
<PRE>
public java.lang.String <B>getProperty</B>(java.lang.String&nbsp;section,
                                    java.lang.String&nbsp;property)</PRE>
<DL>
<DD>Gets a named property from a specific section
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>section</CODE> - The name of the section<DD><CODE>property</CODE> - The name of the property
<DT><B>Returns:</B><DD>The property value, or null, if either the section or property
 does not exist.</DL>
</DD>
</DL>
<HR>

<A NAME="setProperty(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
setProperty</H3>
<PRE>
public void <B>setProperty</B>(java.lang.String&nbsp;section,
                        java.lang.String&nbsp;property,
                        java.lang.String&nbsp;value)</PRE>
<DL>
<DD>Sets the value of a property in a given section.  If the section does
 not exist, it is automatically created.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>section</CODE> - The name of the section<DD><CODE>property</CODE> - The name of the property<DD><CODE>value</CODE> - The value of the property</DL>
</DD>
</DL>
<HR>

<A NAME="removeProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>
removeProperty</H3>
<PRE>
public void <B>removeProperty</B>(java.lang.String&nbsp;section,
                           java.lang.String&nbsp;property)</PRE>
<DL>
<DD>Removes a property from a section.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>section</CODE> - The name of the section<DD><CODE>property</CODE> - The name of the property</DL>
</DD>
</DL>
<HR>

<A NAME="write(java.io.Writer)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(java.io.Writer&nbsp;writer)
           throws java.io.IOException</PRE>
<DL>
<DD>Writes the current iniFile instance to a Writer object for
 serialization.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - The writer to write to
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="read(java.io.Reader)"><!-- --></A><H3>
read</H3>
<PRE>
public void <B>read</B>(java.io.Reader&nbsp;reader)
          throws java.io.IOException</PRE>
<DL>
<DD>Reads from a Reader into the current IniFile instance.  Reading
 appends to the current instance, so if the current instance has
 properties, those properties will still exist.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - The reader to read from.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../net/sf/antcontrib/inifile/IniFileTask.html" title="class in net.sf.antcontrib.inifile"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/antcontrib/inifile/IniFile.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="IniFile.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>