~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/common/org/crosswire/common/util/PropertiesUtil.java

  • Committer: joe
  • Date: 2002-10-08 21:36:18 UTC
  • Revision ID: svn-v4:a88caf3b-7e0a-0410-8d0d-cecb45342206:trunk:80
big config and comment update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
package org.crosswire.common.util;
3
3
 
4
 
import java.util.*;
5
 
import java.io.*;
6
 
 
7
 
import org.crosswire.common.util.*;
 
4
import java.io.BufferedReader;
 
5
import java.io.BufferedWriter;
 
6
import java.io.ByteArrayInputStream;
 
7
import java.io.IOException;
 
8
import java.io.InputStream;
 
9
import java.io.InputStreamReader;
 
10
import java.io.OutputStream;
 
11
import java.io.OutputStreamWriter;
 
12
import java.util.Date;
 
13
import java.util.Iterator;
 
14
import java.util.Properties;
8
15
 
9
16
/**
10
17
 * A generic class of Properties utils.
11
18
 * It would be good if we could put this stuff in java.lang ...
 
19
 * 
 
20
 * <p><table border='1' cellPadding='3' cellSpacing='0'>
 
21
 * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
12
22
 *
13
 
 * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
14
 
 * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
15
23
 * Distribution Licence:<br />
16
 
 * Project B is free software; you can redistribute it
 
24
 * JSword is free software; you can redistribute it
17
25
 * and/or modify it under the terms of the GNU General Public License,
18
26
 * version 2 as published by the Free Software Foundation.<br />
19
27
 * This program is distributed in the hope that it will be useful,
21
29
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
30
 * General Public License for more details.<br />
23
31
 * The License is available on the internet
24
 
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
25
 
 * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26
 
 * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
 
32
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
 
33
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
34
 * MA 02111-1307, USA<br />
27
35
 * The copyright to this program is held by it's authors.
28
36
 * </font></td></tr></table>
29
 
 * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
30
 
 * @see <{docs.Licence}>
31
 
 * @author Joe Walker
 
37
 * @see docs.Licence
 
38
 * @author Joe Walker [joe at eireneh dot com]
 
39
 * @version $Id$
32
40
 */
33
41
public class PropertiesUtil
34
42
{
59
67
            writeln(awriter, "#" + header);
60
68
 
61
69
        writeln(awriter, "#" + new Date().toString());
62
 
        for (Enumeration e = prop.keys(); e.hasMoreElements();)
 
70
        for (Iterator it = prop.keySet().iterator(); it.hasNext();)
63
71
        {
64
 
            String key = (String) e.nextElement();
 
72
            String key = (String) it.next();
65
73
            String val = (String) prop.get(key);
66
74
            key = saveConvert(key);
67
75
            val = saveConvert(val);