• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

How to Read a Flat File Data

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic