Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Max string size?

 
john klucas
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • 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);
}
}
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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