@@ -0,0 +1,869 @@
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0A%0Apublic class CommonFun %7B%0A%09public static final String trim(Object obj) %7B%0A%09%09if (obj == null) return %22%22;%0A%09%09return obj.toString().trim();%0A%09%7D%0A%0A%09public static final List%3CString%3E cut(int limit, String content) %7B%0A%09%09List%3CString%3E list = new ArrayList%3CString%3E();%0A%09%09cut0(limit, content, list);%0A%09%09return list;%0A%09%7D%0A%0A%09private static void cut0(int limit, String content, List%3CString%3E list) %7B%0A%09%09int last = 0;%0A%09%09byte%5B%5D bytes = content.getBytes();%0A%09%09if (bytes.length %3C= limit) %7B%0A%09%09%09list.add(content);%0A%09%09%09return;%0A%09%09%7D%0A%09%09if (isAsciiPrintable((char) bytes%5Blimit - 1%5D))%0A%09%09%09last = limit;%0A%09%09else%0A%09%09%09last = limit - 1;%0A%09%09String section = new String(bytes, 0, last);%0A%09%09list.add(section);%0A%09%09cut0(limit, content.substring(section.length()), list);%0A%09%7D%0A%0A%09static boolean isAsciiPrintable(final char ch) %7B%0A        return ch %3E= 32 && ch %3C 127;%0A    %7D%0A%0A%7D%0A

Create CommonFun.java