private String cutLink(String link,int len){
  if (link.length() > len) {
    String cut=link.substring(0,len / 2) + "..." + link.substring(link.length() - (len / 2));
    return (cut);
  }
  return (link);
}

private String cutLink ( String link , int len ) { if ( link . length ( ) > len ) { String cut = link . substring ( 0 , len / 2 ) + "..." + link . substring ( link . length ( ) - ( len / 2 ) ) ; return ( cut ) ; } return ( link ) ; }
cut the given link string to the specified length + three dots .
