Store input characters in an array

I am trying to read characters from Keyboard. And then I have to print a fixed number of characters on each line.

Below is the code I used for inputing the characters. But I am trying to put every character into an array. Can I use

read(char[] cbuf, int offset, int length)

Read characters into a portion of an array.

But I dont know the length. HOw can I make it to work?

class IChar{

publicstaticvoid main(String args[])throws IOException

{

char c;

BufferedReader br =new BufferedReader(newInputStreamReader (System.in));

System.out.println("Enter the characters");

do{

c = (char) br.read();

}while (c !='q');

[1232 byte] By [sdbula] at [2007-10-2 4:03:25]
# 1
Read the text into a String or StringBuffer. Then use substring() to break it up into the chunks you need.
floundera at 2007-7-15 23:25:55 > top of Java-index,Java Essentials,New To Java...