aspose file tools*
The moose likes I/O and Streams and the fly likes reading passwords and connections from a flat file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "reading passwords and connections from a flat file" Watch "reading passwords and connections from a flat file" New topic
Author

reading passwords and connections from a flat file

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Jun 01, 2000
Posts: 146
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

Joined: Nov 22, 2008
Posts: 18944
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
 
subject: reading passwords and connections from a flat file