English | Site Directory

Android - An Open Handset Alliance Project

java.net
public class

java.net.InetSocketAddress

java.lang.Object
java.net.SocketAddress Serializable
java.net.InetSocketAddress

Summary

Public Constructors

          InetSocketAddress(int port)
          InetSocketAddress(InetAddress address, int port)
          InetSocketAddress(String host, int port)

Public Methods

      static  InetSocketAddress  createUnresolved(String host, int port)
Creats an InetSocketAddress without trying to resolve hostname into an InetAddress.
    final    boolean  equals(Object socketAddr)
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    final    InetAddress  getAddress()
    final    String  getHostName()
    final    int  getPort()
    final    int  hashCode()
Answers an integer hash code for the receiver.
    final    boolean  isUnresolved()
        String  toString()
Answers a string containing a concise, human-readable description of the receiver.
Methods inherited from class java.lang.Object

Details

Public Constructors

public InetSocketAddress(int port)

public InetSocketAddress(InetAddress address, int port)

public InetSocketAddress(String host, int port)

Public Methods

public static InetSocketAddress createUnresolved(String host, int port)

Creats an InetSocketAddress without trying to resolve hostname into an InetAddress. The address field is marked as unresolved.

Returns

  • an InetSocketAddress instance.

Throws

IllegalArgumentException if host is null or the port is not in the range between 0 and 65535.

public final boolean equals(Object socketAddr)

Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. The implementation in Object answers true only if the argument is the exact same object as the receiver (==).

Parameters

socketAddr Object the object to compare with this object.

public final InetAddress getAddress()

public final String getHostName()

public final int getPort()

public final int hashCode()

Answers an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

public final boolean isUnresolved()

public String toString()

Answers a string containing a concise, human-readable description of the receiver.
Build m5-rc15i - 10 Jun 2008 13:54