• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to search and read values from text file

 
Ranch Hand
Posts: 620
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all
I have text files that construct from category and under it I have some variable and value something like that:

[category1]
foo = "hello"
boo ="bye"

[category2]
boo = "my"
dpp = "name"
num = 242

my function getting 2 args first is category name and the second is the value under this category
do I need to read all the files until im getting to the category and then do while loop until im getting to the next "["
and parse the variable value in-between ?
or there is faster and better way to do it?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Meir,
This forum is for JSP issues.
We have a forum dedicated to IO and Streams.
I'll move this thread there for you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic