File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes File Reading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "File Reading" Watch "File Reading" New topic
Author

File Reading

kalai sundar
Ranch Hand

Joined: May 25, 2005
Posts: 69
I am reading a file , i want to exract each every word from the whole file, how i can do, hepl me, here is my code vat i am doing now, plz hepl me....

public void getContent(String s){
String line="",rtvalue="";
try{

FileReader f = new FileReader(s);
BufferedReader br=new BufferedReader(f);

while((line = br.readLine())!=null)
{

rtvalue = rtvalue + line;
System.out.println("the file value started");
System.out.println(rtvalue);

}

// txtAfile.setText(rtvalue);
// txtFile.setText(null);
}



kalai

catch(Exception e){
System.out.println(e);
}
}
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
Do you have a question?
You need to describe your problem!
If you are getting errors, copy and paste them here.
If you're program is not doing what you want it to, write a description of what it is doing and what you want to change. Include examples and output from the program.
 
Don't get me started about those stupid light bulbs.
 
subject: File Reading