Read specific line

Dear All,

I have a one input file following way:

PATH: Top/Science/Earth Sciences/Atmospheric Chemistry

RAW: Atmospheric Chemistry

WSDA: Atmospheric() chemistry(70995,WordNet_2.1:n#06005460)

PATH: Top/Science/Earth Sciences/Atmospheric Chemistry/Publication

RAW: publication

WSDA: publication(41740,WordNet_2.1:n#01087739)

PATH: Top/Science/Earth Sciences/Atmospheric Chemistry/Modeling

RAW: Modeling

WSDA: Modeling(42261,WordNet_2.1:n#00885978)

I want to read a specific line RAW and store each line in the array list. Could you please give me some suggestions. How to read specific line . I know how to read file and line but I do not know the specific line. .

Thanks a lots .

morshed

[772 byte] By [morshed_1471@yahoo.coma] at [2007-11-27 10:13:28]
# 1

What's your problem - reading the file or finding RAW in the String?

aniseeda at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 2

I'm not sure I get the question. I'd say keep reading lines from the beginning of the file until you've read the line you want, and you're done. What's the problem with this approach? :-)

OleVVa at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 3

:-) That was an interesting typo 'aniseed'!

sabre150a at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 4

> :-) That was an interesting typo 'aniseed'!

That's what happens when I type with my glasses off.

aniseeda at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 5

Is it only me not getting the typo? I thought I used to be good at spotting typos :-/

OleVVa at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 6

> Is it only me not getting the typo? I thought I used

> to be good at spotting typos :-/

You had to be quick to see it - it only existed for about 5 seconds.

sabre150a at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 7

Thanks for replying. That's comforting.

OleVVa at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 8

what I wrote you before , It was my file structure of text file.

My problem is how can I store the token from perticular line .

suppose my perticular line is RAW

i want to store the token following:

ArrayList ar =new ArrayList()

ar.add(Atmospheric Chemistry)

ar.add(publication)

ar.add(modelling)

But I am facing problem to read a specific line like RAW: Atomospheric Chemistry .

I want to ignore line PATH and WASD etc. if you know it please let me know.

thanks ..

morshed

morshed_1471@yahoo.coma at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...
# 9

Well, the simple approach is to test the lines with the startsWith method of String, then use the substring method to chop off the first 5 characters.

malcolmmca at 2007-7-28 15:26:59 > top of Java-index,Java Essentials,Java Programming...