The stringbuffer class allows you to manipulate strings of arbitrary length. You can append data to a stringbuffer or write data at arbitrary positions in the buffer.