public static String shortName(InetAddress hostname) {
public static String shortName(String hostname) { int index; StringBuffer sb=new StringBuffer();
    public static String shortName(InetAddress hostname) {        if(hostname == null) return null;        StringBuffer sb=new StringBuffer();        if(resolve_dns)            sb.append(hostname.getHostName());        else            sb.append(hostname.getHostAddress());        return sb.toString();    }