/** * ********************************************************************** * Prints the iniFile. * * @param ps The <code>PrintStream</code> to which to print. */ public void printProps(PrintStream ps) { Enumeration se = getSectionList(); if (se == null) { ps.println(errMsg); } else { while (se.hasMoreElements()) { String sname = (String) se.nextElement(); setSection(sname); ps.println("[" + sname + "]"); Enumeration pe = getPropList(sname); while (pe.hasMoreElements()) { String pair[] = (String[]) pe.nextElement(); String prop = pair[0]; String valu = getProperty(prop); ps.println(" \"" + prop + "\" = \"" + valu + "\""); } } } } //************************************************************************
/** * ********************************************************************** * Prints the iniFile. * * @param ps The <code>PrintStream</code> to which to print. */ public void printProps(PrintStream ps) { Enumeration se = getSectionList(); if(se == null) { ps.println(errMsg); } else { while(se.hasMoreElements()) { String sname = (String) se.nextElement(); setSection(sname); ps.println("[" + sname + "]"); Enumeration pe = getPropList(sname); while(pe != null && pe.hasMoreElements()) { String pair[] = (String[]) pe.nextElement(); String prop = pair[0]; String valu = getProperty(prop); ps.println(" \"" + prop + "\" = \"" + valu + "\""); } } } } //************************************************************************