public class Solution { public String replaceSpace(StringBuffer str) { return str.toString().replace(" ","%20"); } }