Lines reading in file selectively
Is there a way that I can read the lines in a file selectively? Jumping to the line number directly and read from that line onwards without having to read each line one by one.
Example,
DBConfig.properites is the simple ASCII file with content like below.
#UNIT
dbname=DBUnit
uid=unit
pwd=xxx
#MODEL
dbname=DBModel
uid=model
pwd=xxx
#PROD
dbname=DBProd
uid=prod
pwd=xxx
Depending on the parameter that has been passed to me whether it is unit/model/prod I want to read only that block of lines from the file and then store them in a Hashtable as key-value pairs. I don't want to do a line by line reading and doing one by one comparison here. Is this possible?
Thanks,
Gopal

