Here you can find the source of parseAddress(SocketAddress address)
public static String[] parseAddress(SocketAddress address)
//package com.java2s; //License from project: Apache License import java.net.SocketAddress; public class Main { public static String[] parseAddress(SocketAddress address) { String addressStr = address.toString(); if (addressStr.startsWith("/")) { addressStr = addressStr.replace("/", ""); }/*from ww w.jav a 2 s . c o m*/ String[] tmp = addressStr.split(":"); return tmp; } public static String toString(Object... args) { StringBuilder s = new StringBuilder(); for (Object arg : args) { if (arg != null) { s.append(arg); } } return s.toString(); } }