Results 1 to 3 of 3
  1. #1
    bugger is offline Senior Member
    Join Date
    Nov 2007
    Posts
    111
    Rep Power
    0

    Default reading text character by character

    I use following code to read a line from console.

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

    Regards.

  2. #2
    ShoeNinja's Avatar
    ShoeNinja is offline Senior Member
    Join Date
    Oct 2007
    Posts
    124
    Rep Power
    0

    Default

    Java 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))

  3. #3
    bugger is offline Senior Member
    Join Date
    Nov 2007
    Posts
    111
    Rep Power
    0

Similar Threads

  1. getting each character from keyboard
    By Sreejesh25 in forum New To Java
    Replies: 11
    Last Post: 01-25-2011, 01:08 PM
  2. count character in text file as input file
    By aNNuur in forum New To Java
    Replies: 7
    Last Post: 03-25-2010, 04:01 PM
  3. getting each character from keyboard
    By Sreejesh25 in forum Advanced Java
    Replies: 6
    Last Post: 03-05-2010, 07:12 PM
  4. Help unicode character
    By JT4NK3D in forum New To Java
    Replies: 3
    Last Post: 11-18-2007, 07:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •