Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kiswar Malik   on Jan 29 In Java Category.

  
Question Answered By: Brandon Tucker   on Jan 29

for text file  you should use FileReader and for binary , you could use
FileInputStream...

code is like :
try {
reader = new BufferedReader(new FileReader(fileName));
} catch (FileNotFoundException e) {e.printStackTrace();}

then you could read it line by line using method BufferedReader.readLine() ;

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Reading and writing files Or get search suggestion and latest updates.


Tagged: