Java Socket Address Get toAddressString(InetSocketAddress address)

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

Description

to Address String

License

Apache License

Declaration

public static String toAddressString(InetSocketAddress address) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.*;

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

Related

  1. socketAddress2String(final SocketAddress addr)
  2. string2SocketAddress(final String addr)
  3. stringAddressToSocketAddress(String address)
  4. stringifyInetSocketAddressList(InetSocketAddress[] addresses)
  5. stringToInetSocketAddress( String address, int defaultPort)
  6. toByte(InetSocketAddress socketAddress)
  7. toBytes(SocketAddress address)
  8. toFileName(InetSocketAddress address)
  9. toHttpUrl(InetSocketAddress addr)