String cannot be converted to StringBuffer
<p>I am making a playfair cipher and I encountered an error that String cannot be converted to StringBuffer. How can I make my program work? Or how can I convert StringBuffer to String without compromising the code?</p>

<pre><code>public static StringBuffer addFiller (StringBuffer input)
 {       
     for( int x = 0; x &lt; input.length() - 1; x++)
     {
         if(input.substring(x+1, 1).equals(input.substring(x, 1)))
         {
           input = input.insert(x+1, "Q");
         }
         if("Q".equals(input.substring(x, 1)) &amp;&amp; "Q".equals(input.substring(x+1, 1)))
         {
            input = input.insert(x+1, "Z");
         }
     }
     return input;
 }

 public static String modifyPlaintext(String keyword)
{      
    keyword = keyword.toUpperCase();
    keyword = keyword.trim();
    keyword = keyword.replace(" ","");
    //StringBuffer.toString(addFiller);
    keyword = addFiller(keyword); // error starts here and it says that keyword = java.lang.String "ALLISKNOWNFLYATONCE" even though I didn't initialize it. What does it mean?


    if (keyword.length() % 2 != 0)
        {
            keyword += "Q";
        }
        keyword = insertSpaceInSpecificNumber(2, keyword, ' ');

    return keyword;
}
</code></pre>