• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
add file in WOLips and read it.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Non-direct Java client nib problem (From: Yves Custeau <email@hidden>)

  • Prev by Date: Another WebServices Question
  • Next by Date: Best Approach Question
  • Previous by thread: Non-direct Java client nib problem
  • Next by thread: Split Install with Xtools
  • Index(es):
    • Date
    • Thread