本地SocketAddress
/**来 自 nowjava.com - 时 代 Java**/ //package com.nowjava; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; public class Main { public static void main(String[] argv) throws Exception { int port = 2; System.out.println(localAddress(port)); } private static final byte[] IPV4_LOCALHOST = new byte[] { 127, 0, 0, 1 }; public static SocketAddress localAddress(final int port)