Java Socket Address Get IpToString(InetSocketAddress address)

Here you can find the source of IpToString(InetSocketAddress address)

Description

Ip To String

License

Open Source License

Declaration

public static String IpToString(InetSocketAddress address) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.net.InetSocketAddress;

public class Main {
    public static String IpToString(InetSocketAddress address) {
        String s = address.getAddress().getHostAddress() + ":" + address.getPort();
        return s;
    }//from w  w  w .j  a  v  a 2  s  .  c  om
}

Related

  1. getSocketAddress(String hostHeader)
  2. getSocketAddressList(String list, int defaultPort)
  3. getSocketConnectString( InetSocketAddress socketAddress)
  4. inetAddrToHoman(final InetSocketAddress sockAddr)
  5. inetSocketAddress2IpPort(InetSocketAddress addr)
  6. isAddressDefined(InetSocketAddress address)
  7. isLegalPeerAddress(@CheckForNull SocketAddress socketAddress)
  8. isLocalAddress(Socket socket)
  9. isSameAddress(SocketAddress a1, SocketAddress a2)