Help coderanch get a
new server
by contributing to the fundraiser
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Max string size?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Can any one tell me, what i have to do if the String Object holds data more than 20-22MB of data.
The string object holds that much of data and then the same data have to be displayed in a text area.
i am doing something like this:
private void doReadFile(BufferedReader fileReader) {
String strial = "";
String s = "";
try{
if(fileReader != null)
{
ivjTextArea1.append("One Moment Please.....");
while ((s=fileReader.readLine()) != null)
{
temptrial.append(s+"\n");
}
strial = temptrial.toString();
ivjTextArea1.setText(temptrial.toString());
fileReader.close();
}
} catch(Throwable exception){
handleException(exception);
}
}
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
First off, please don't post to multiple forums.

Second, please read the Official JavaRanch Naming Policy... Please re-register with a user name that consists of a first name, a space, and a last name.

Since this topic already exists in Java In General( Intermediate ), I am closing this one...

-Nathan
    Bookmark Topic Watch Topic
  • New Topic