add file in WOLips and read it.
add file in WOLips and read it.
- Subject: add file in WOLips and read it.
- From: "WebObjects EMail" <email@hidden>
- Date: Tue, 16 Mar 2004 12:10:36 +0100
i use Eclipse with WOLips.
i must read a file which call email.txt this is unicode file.
then edit the text and .... etc..
i read it like this:
public String readTextFile(String filename)
{
String text = "";
File fFile = new File(filename);
// File fFile = new File("",filename); I also tried this
try
{
String line;
BufferedReader readtext = new BufferedReader(new
InputStreamReader(
new FileInputStream(fFile),
"UTF-16"));
// BufferedReader readtext = new BufferedReader (new
FileReader(filename));
while((line = readtext.readLine()) != null)
{
text += line + "\n";
}
}
catch(Exception e)
{
System.out.println(" line 65" + e);
}
System.out.println("email text : " + text);
return text;
}
i get this error :
ReadOwnFile line 65java.io.FileNotFoundException: email.txt (The system
cannot find the file specified)
my Questions:
1. how do i add a file in WOLips that the email.txt will be automatically
included in the dist directory?
2. where should the file be to be found?
thank you.
Sako
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.