Here you can find the source of subStringNotEncode(String subject, int size)
public static String subStringNotEncode(String subject, int size)
//package com.java2s; public class Main { public static String subStringNotEncode(String subject, int size) { if ((subject != null) && (subject.length() > size)) subject = subject.substring(0, size) + "..."; return subject; }// w w w . ja va 2s . c o m }