Read a single line from a file

K

Ken Kafieh

Hi

Is there a built-in class/method for reading a single line from a file?
Or do I have to build that from scratch? If you have a clever/efficient way
to do that, please show off. :)

Thanks for any help!

Ken
 
A

Andrew Thompson

, please show off. :)

Please show some effort in your question
...or google, or do the Sun I/O turorials
or use the Java Glossary I/O code generator.. ;-)
 
K

Ken Kafieh

Andrew, you took the time to slap my wrist. Could you have taken the time
to tpye out 2 or three more characters in order to say "yes" or "no" to my
straightforward question? So it sounds like you knew the answer and just
decided not to help. If you are primarily concerned with being judge of
other peoples ettiquette then maybe you should consider the following as a
possible rule for yourself in the future...

*** Never respond to a message unless you think you might have a reasonable
chance of giving a useful answer. There is a lot of good reasons for that.
It may even cut down on the asker being tempted to repost their same
question again. ***

I wouldn't have asked a question here if I didn't already look myself.
It's obvious, I am new to Java.
I looked in the API spec and there only seems to be a method for reading one
character at a time.
There doesn't seem to be other File related classes that have what I am
looking for.
I also seached through the last 900 messages in this news group.

Can anyone recommend a friendlier message board or news group?

-Ken
 
A

Andrew Thompson

Could you have taken the time
to tpye out 2 or three more characters in order to say "yes" or "no" to my
straightforward question?

no. (or rather. yes, no, and maybe,
depending on how you interpret the
question)

Could you have taken the time to Google
before you asked your lazy, inane question
on a technical group?

Perhaps you would be better off with a much
_nicer_ group for the moment..
<http://www.physci.org/codes/javafaq.jsp#cljh>

Note the last sentence of that entry though..
"However, use of the c.l.j.help group is
no excuse to skimp on your research. "

Happy Googling. ;-)
 
K

Ken Kafieh

Could you have taken the time to Google
before you asked your lazy, inane question
on a technical group?

Lazy? Inane? A little quick on the trigger with the insults, and criticism.
Still no, yes or no. oh well.

Maybe it just didn't register what I said before. So I will say it again:
This news group is NOT the first thing I tried.

If you need everyone to list their research efforts before every question in
order to prove their worthiness, this will be a much more cluttered board.
Upon seeing my question, you probably said to yourself, "Oh!! Thats an easy
one!! Everyone KNOWS THAT!, This guy must be lazy!" Just because the info
I was seeking might be commonly known, doesn't mean its easy to find in
writing." I was going to challenge you to do a google search that would
come up with the answer I was looking for within say 15 minutes. But that
would be too easy for you to cheat on. And with your mentality, you'd
probably see this as another attempt to trick you into doing my research for
me (and well, you'd be half right about that).



I realize that I left this message way open to snappy, witty (and
predictably useless) responses from you. So take your pick and fire away.
Have a ball. It seems to be what you like to do best. But since, I am
convinced you are not in a helpful mood, I wont bother checking back in on
your messages or even responding.



By the way. You are just mean.
 
R

Roedy Green

Could you have taken the time to Google
before you asked your lazy, inane question
on a technical group?

Often the problem is knowing what to ask for.
googling "read line" won't get you anywhere.
 
R

Roedy Green

The personal evaluation was uncalled for, so you got one back. You
could have answered that question with something like

"look on google.ca with the keywords [java read line]"
 
C

Chris Smith

Ken said:
Is there a built-in class/method for reading a single line from a file?
Or do I have to build that from scratch? If you have a clever/efficient way
to do that, please show off. :)

java.io.BufferedReader

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top