Casting stringBuffer to String