get values from a textfile

The following is the format of a text file from which I need to extract a couple of values.

One way is to use Properties to load these values into hashtables and get it.

But just for getting one or two values, I dont want to load every thing.

Is there any other SIMPLE way. How about parsing using string tokenizer ?

Please let me know ur suggestions.

Thanks.

-

Windows Registry Editor Version 5.00

[HKEY_USERS\S-1-5-21-4008691576-2855246935-1980400296-1004\Software\Microsoft\Internet Account Manager\Accounts\00000001]

"Account Name"="someaccount"

"Connection Type"=dword:00000003

"POP3 Server"="somepop3"

"POP3 User Name"="someuser"

"POP3 Prompt for Password"=dword:00000001

"SMTP Server"="somesmtp"

"SMTP Display Name"="somename"

"SMTP Email Address"="some@email.com"

"POP3 Skip Account"=dword:00000000

"SMTP Organization Name"="some.org"

...

...

...

[988 byte] By [krrajesh2a] at [2007-9-30 1:44:59]
# 1
Do somenthing like this to create a string and then parse it as needed.FileReader fr = new FileReader( "<source file>" );char[] ca = new char[1024];int charsRead = fr.read( ca );fr.close();String st = new String(ca).trim();
ChuckBinga at 2007-7-16 6:23:05 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
> I dont want to load every thingIf you don't know where the data is how are you going to find it 'without loading everything"? There is no magical way to get data out of a variable length file. You need to read the data and parse it.
camickra at 2007-7-16 6:23:05 > top of Java-index,Archived Forums,New To Java Technology Archive...