StringBuffer sb=new StringBuffer(); if(resolve_dns) sb.append(hostname.getHostName());
index=hostname.indexOf('.'); if(index > 0 && !Character.isDigit(hostname.charAt(0))) sb.append(hostname.substring(0, index));
    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();    }