public java.lang.String toString(){
  return internal.toString();
}

public java . lang . String toString ( ) { return internal . toString ( ) ; }
converts to a string representing the data in this string buffer . a new string object is allocated and initialized to contain the character sequence currently represented by this string buffer . this string is then returned . subsequent changes to the string buffer do not affect the contents of the string . implementation advice : this method can be coded so as to create a new string object without allocating new memory to hold a copy of the character sequence . instead , the string can share the memory used by the string buffer . any subsequent operation that alters the content or capacity of the string buffer must then make a copy of the internal buffer at that time . this strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string buffer .
