Here you can find the source of address2string(InetSocketAddress isa)
public static String address2string(InetSocketAddress isa)
//package com.java2s; //License from project: Open Source License import java.net.InetSocketAddress; public class Main { public static String address2string(InetSocketAddress isa) { if (isa == null) return null; return isa.getAddress().getHostAddress() + ":" + isa.getPort(); }/*from w w w . j a v a2 s . c o m*/ }