KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > yagga > util > AssociativeString


1 /*
2  * This file is part of MiniInstaller, a self installer builder for Java
3  * Copyright (C) 2002 Walter Gamba
4  * mailto:walter@yagga.net
5  * http://www.yagga.net/java/miniinstaller
6  *
7  * MiniInstaller is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * MiniInstaller is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  *
21  * As the time of writing, the GNU General Public Licene can be
22  * found at http://www.gnu.org/licenses/gpl.txt
23  *
24  */

25
26 /**
27     AssociativeString.
28
29     A file containings pairs key = value
30     key can have spaces
31     Comments in the form #, // or as usual C-like /* ...
32 */

33 package net.yagga.util;
34
35 import java.util.*;
36 import net.yagga.util.Ut;
37 import java.io.*;
38
39 public class AssociativeString extends AssociativeReader
40 {
41     String JavaDoc associativeString;
42
43     public AssociativeString(String JavaDoc str)
44     {
45     associativeString=str;
46   }
47
48     public boolean parseAssociative(HashMap map)
49     {
50         Reader r=new StringReader(associativeString);
51     return super.parseAssociativeReader(map,r);
52     }
53
54 }
55
Popular Tags