Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CHAR ARRAYS problem  RSS feed

 
Prashant Bopardikar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to copy data from a PipedReader into a char array and then stream it out
using out.print(char[]);
The problem is that if I define a small char[] I am unable to get a large amount of data and if I define a large char[] I am unable to get a small
amount of data thro the Reader streamed out.
Can someone HELP...
Thanks in advance
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about using a:
stringBuffer.append(char);
or
stringBuffer.append(char[]);
to read in the char data.
Then do:
stringBuffer.toString().toCharArray()
when you are ready to stream it out...
Oh and they're gonna ask you to change your name I think... :roll:
[ June 07, 2002: Message edited by: Chris Shepherd ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!