Here you can find the source of encodeEntities(String content)
public static String encodeEntities(String content)
//package com.java2s; //License from project: Open Source License public class Main { public static String encodeEntities(String content) { content = content.replace("&", "&"); content = content.replace("<", "<"); content = content.replace(">", ">"); content = content.replace("\"", """); content = content.replace("'", "'"); return content; }/*w ww . ja v a2 s . c o m*/ }