void addString(int c){
  if (strpos == str.length) {
    char newstr[]=new char[str.length * 2];
    System.arraycopy(str,0,newstr,0,str.length);
    str=newstr;
  }
  str[strpos++]=(char)c;
}

void addString ( int c ) { if ( strpos == str . length ) { char newstr [ ] = new char [ str . length * 2 ] ; System . arraycopy ( str , 0 , newstr , 0 , str . length ) ; str = newstr ; } str [ strpos ++ ] = ( char ) c ; }
add a char to the string buffer .
