aspose file tools*
The moose likes JSP and the fly likes How to search and read values from text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to search and read values from text file " Watch "How to search and read values from text file " New topic
Author

How to search and read values from text file

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
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?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Meir,
This forum is for JSP issues.
We have a forum dedicated to IO and Streams.
I'll move this thread there for you.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to search and read values from text file
 
Similar Threads
Inner Classes Mock question doubt 2
Using String() method to initialize variable
Looking for text matching algorithm /patterns
How to search and read values from text file
Variables from classes