convert buffer from String object to a StringBuffer object