InetSocketAddress


InetSocketAddress java.net

Java 1.4 serializable

InetSocketAddress represents an the combination of an IP (Internet Protocol) address and a port number. The constructors allow you to specify the IP address as an InetAddress or as a hostname, and they also allow you to omit the IP address, in which case the wildcard address is used (this is useful for server sockets).

Figure 12-9. java.net.InetSocketAddress

 public class  InetSocketAddress  extends SocketAddress {  // Public Constructors  public  InetSocketAddress  (int  port  );        public  InetSocketAddress  (InetAddress  addr  , int  port  );        public  InetSocketAddress  (String  hostname  , int  port  );  // Public Class Methods   5.0  public static InetSocketAddress  createUnresolved  (String  host  , int  port  );  // Public Instance Methods  public final InetAddress  getAddress  ( );        public final String  getHostName  ( );        public final int  getPort  ( );        public final boolean  isUnresolved  ( );  // Public Methods Overriding Object  public final boolean  equals  (Object  obj  );        public final int  hashCode  ( );        public String  toString  ( );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net