Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

retrieving data from a text file  RSS feed

 
Bernard Sigmund Gustav
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone and merry christmas.

i hope someone can help me with this.
i have a scanner which outputs its data, delimited ba a space, to a text file.

i then need to retrieve those in the text file, and upload it to the database, using java.

what does java use to retrieve data from text files? i just need to get a headstart on this to keep me going.

thanks in advance for the help....
 
Mike Noel
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out BufferedReader and then associated classes. That will get you started reading text files.

_M_
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just elaborating a little.
Use java.io
for reading and writing onto files. There are lots of examples posted on net. but still check out the Sun's
tutorials. This will give u enough head start.
 
Hank GU
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


you may use java.io.LineNumberReader if u need track line numbers.

Merry X'mas~~~~
 
Bernard Sigmund Gustav
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.

i will study that....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!