android copy StringBuffer
<p>I have declared two string buffers like,</p>

<pre><code>private StringBuffer buf = new StringBuffer(1024);
private StringBuffer bufRetro = new StringBuffer(1024);
</code></pre>

<p>on following code, before bufRetro = buf, buf has proper filled value. However, after copy it, both have no content. How to set one stringBuffer from another one? Thank you.</p>

<pre><code>if(this.v_Id){

    buf.append(ch, start, length);

    if (bufType.equals(bufOld)){

        buf = bufRetro.append(buf);

    }

    myParsedXMLDataSet.setId(buf.toString());

    bufOld = bufType;

    bufRetro.delete(0, bufRetro.length());
    bufRetro = buf;

    Log.d("id", buf.toString());

    buf.delete(0, buf.length());
</code></pre>
