Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-2007, 08:13 PM
Senior Member
 
Join Date: Nov 2007
Posts: 111
bugger is on a distinguished road
reading text character by character
I use following code to read a line from console.

Code:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String readLine = br.readLine();
How can I read text character by character?

Regards.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-09-2007, 09:55 PM
ShoeNinja's Avatar
Senior Member
 
Join Date: Oct 2007
Posts: 123
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
Code:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
This gives the buffered reader a 1 byte buffer.

BufferedReader (Java 2 Platform SE v1.4.2))
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-09-2007, 10:54 PM
Senior Member
 
Join Date: Nov 2007
Posts: 111
bugger is on a distinguished road
Thanks. It helps.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting each character from keyboard Sreejesh25 New To Java 8 04-08-2008 05:39 AM
getting each character from keyboard Sreejesh25 Advanced Java 1 04-02-2008 07:31 PM
Character Streams JavaForums Java Blogs 0 12-26-2007 04:01 PM
Help unicode character JT4NK3D New To Java 3 11-18-2007 09:55 AM
count character in text file as input file aNNuur New To Java 0 06-18-2007 08:46 AM


All times are GMT +3. The time now is 10:53 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org