The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

try using StringBuffer class

Posted by Manpreet Minhas on January 04, 2002 at 12:57 AM

Hi Hiran,

i hope m not late in answering back.....
why don't u try using the StringBuffer class instead of using String as it can store any volume of data

FileInputStream fis = new FileInputStream("Test.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(fr));
StringBuffer buffer = new StringBuffer();

do
{
buffer.append(br.readLine());
}while(fis.available()>0);

Manpreet




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us