code: private static void replaceAll(StringBuffer s,
  			final String o, final String n) {
  		int olen = o.length();
  		int nlen = n.length();
  		int found = s.indexOf(o);
  		while (found >= 0) {
  			s.replace(found,found + olen,n);
  			found = s.indexOf(o,found + nlen);
  		}
  	}
docs: /*
  STATIC CONVENIENCE METHODS