1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
|
public class FileMap
{
protected Map<String, String> filemap;
public FileMap(){}//welche Konstruktoren sinnvoll sind überlass ich jetzt mal dir
public void ReadFile(String filename)
{
try{
BufferedReader in = new BufferedReader(new FileReader("config.dat"));
//datei inhalt lesen
String content;
// in -> content ka. wie genau
// in die Map damit
filemap.insert(filename,content);
}catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
} |