File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading passwords and connections from a flat file

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi there!
I am currently trying to figure out how to read connection information (ie username, password, dbname,...) from a plain text file. Does anyone have any leads or helpful tips???
Christine
 
Milind Kulkarni
Ranch Hand
Posts: 146
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is how I would proceed:
1> Create an instance of File object
2> Read the file contents using BufferedReader and FileReader objects.
3> Read the file contents line by line.
4> Use the StringTokenizer object to break the line into various String tokens.
5> Store the tokens ( which may include user ids, passwords, etc.) into different vectors.
Regards,
Milind

[This message has been edited by Milind Kulkarni (edited August 30, 2000).]
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi again,
Thank you for your help, I have resolved my problem. I'm glad that there is a spot like this where programmers can help one another. I'll keep an eye on this place and help out when I can.
Thanks again.
Christine
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic