Here you can find the source of abbreviate(String name)
public static String abbreviate(String name)
//package com.java2s; //License from project: Open Source License public class Main { public static String abbreviate(String name) { StringBuilder newName = new StringBuilder(name); if (name.length() > 14) { for (int i = 0; i < (name.length() - 12); i++) { newName.deleteCharAt(newName.length() - 1); }/*from w ww. j a v a 2 s .c o m*/ newName.append(".."); return newName.toString(); } return name; } }