Hat jemand mal ein Beispiel, wo ich den Inhalt einer Datei einlese und in ein Array speichere? Ich weiß nur, das ich das mit FileInputStream mache. Wichtig ist halt, das alles ins Array geschrieben wird. Ein wenig gebastelt hab ich schon, aber es klappt nicht so richtig!
Code:
public String [] getDatei(String NAME)
{
Properties props = new Properties();
try
{
FileInputStream fis = new FileInputStream("c:/path/...");
props.load(fis);
getDatei = props;
}
catch(Exception e)
{
e.printStackTrace();
}
return getDatei(NAME);
}