File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "" Watch "" New topic

Bron Czimes
Ranch Hand

Joined: May 09, 2004
Posts: 44
hi there
just a quick question. is there an alternative to if you want to read more than one character at a time, say, maybe a few words or something...???
David Peterson
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
You can read line-by-line with a BufferedReader.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Yes. You can wrap the InputStream in a BufferedReader, which will allow you to read a line of text a time.
To begin to form a good understanding for how these fancy Streams and Readers work, I recommend reading the I/O Lesson of Sun's Java Tutorial.
[ May 09, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link: