Code example for InetSocketAddress

Methods: getHostNamegetPort

0
    /** 
     * Creates a ServerAddress 
     * @param addr inet socket address containing hostname and port 
     */ 
    public ServerAddress( InetSocketAddress addr ){
        _host = addr.getHostName();
        _port = addr.getPort();
    } 
 
    // -------- 
    // equality, etc... 
    // -------- 
 
 
    /** 
     * Determines whether this address is the same as a given host. 
     * @param host the address to compare 
     * @return if they are the same 
     */ 
    public boolean sameHost( String host ){
Stop searching for code, let great code find you!  Add Codota to your java IDE