Hi, this is frag and i am a neewbie!
I am just fighting with my JBuilder...
I want to open a text-file with usernames and passwords.
I want to store the username aswell as the password to a string and save it into a vector.
It's one line for a name and one for the password, eg.:
user1
pwd1
user2
pwd2
user3
pwd3
...
Again: How do i open and read the file (until EndOfFile)?
Here is my code so far:
BufferedReader in = new BufferedReader(new FileReader file_path));
while (endOfFile == false)
{
username = in.readLine();
password = in.readLine();
rights = in.readLine();
usrec = new user_rec(username, password, rights);
userpwd.addElement(usrec);
}
PLEASE HELP ME!
thanx!
cya
frag
I am just fighting with my JBuilder...
I want to open a text-file with usernames and passwords.
I want to store the username aswell as the password to a string and save it into a vector.
It's one line for a name and one for the password, eg.:
user1
pwd1
user2
pwd2
user3
pwd3
...
Again: How do i open and read the file (until EndOfFile)?
Here is my code so far:
BufferedReader in = new BufferedReader(new FileReader file_path));
while (endOfFile == false)
{
username = in.readLine();
password = in.readLine();
rights = in.readLine();
usrec = new user_rec(username, password, rights);
userpwd.addElement(usrec);
}
PLEASE HELP ME!
thanx!
cya
frag