The moose likes I/O and Streams and the fly likes How to Read a Flat File Data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "How to Read a Flat File Data" Watch "How to Read a Flat File Data" New topic
Author

How to Read a Flat File Data

khad M
Ranch Hand

Joined: Nov 26, 2001
Posts: 48
Hi Ranchers good Morning.
This is my fisrt Query in this forum.
I want to read a flat file data using JAVA.
How to do this.
I heard that StringTokeinger to be used.What exactly it is?
i.e How to read and Write on to flat file using JAVA I/O strems.
Thanks in advance.

Regards
Khad M
SCJP2.0
Roy Sin
Greenhorn

Joined: Mar 12, 2002
Posts: 10
well, basically it depends what data does ur flat file consists of...
if it is just normal strings n endline char at the end...
ie. a
b
c

u could just use bufferedreader
if it is a whole string that is seperated by deliminators... and u wish to get each character out.. then u use stringtokenizer
ie a,b,c,d,e
bufferedreader code

stringtokenizer code

do a search on these topics.. there are lots of examples about bufferedreader and stringtokenizer.. also .. read up on the API Index..
 
IntelliJ Java IDE
 
subject: How to Read a Flat File Data
 
Threads others viewed
text file input
which is the best way to declare constants?
SWING examples needed!
How to read a flat file?
JDBC with flat file
developer file tools