List of usage examples for java.net ServerSocket getChannel
public ServerSocketChannel getChannel()
From source file:Main.java
/** * Renders the details of a server socket in the returned string * @param socket The server socket to render * @return the details of the server socket as a string */// ww w . j a v a 2 s.c om public static String render(ServerSocket socket) { if (socket == null) return "NULL"; StringBuilder b = new StringBuilder("\nSocket ["); b.append("\n\tLocalPort:").append(socket.getLocalPort()); b.append("\n\tLocalAddress:").append(socket.getInetAddress()); b.append("\n\tLocalSocketAddress:").append(socket.getLocalSocketAddress()); b.append("\n\tChannel:").append(socket.getChannel()); b.append("\n\tHashCode:").append(socket.hashCode()); b.append("\n]"); return b.toString(); }