head 1.1; branch 1.1.1; access ; symbols DEVEL:1.1.1.1 HEAD:1.1.1; locks ; strict; comment @# @; 1.1 date 2001.03.16.18.13.10; author jallali; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.03.16.18.13.10; author jallali; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.net
Class InetAddress

    java.lang.Object
      |
      +--java.net.InetAddress

public final class InetAddress
extends Object
implements Serializable

See Also:
  Serialized Form

Constructor Summary
`protected` | `InetAddress(int address)` Constructs an InetAddress, representing the `address`.
`protected` | `InetAddress(int address, String hostName)` Constructs an InetAddress, representing the `address` and `hostName`.

Method Summary
`boolean` | `equals(Object obj)` Compares this `InetAddress` against the specified object.
`byte[]` | `getAddress()` Returns the IP address of this `InetAddress` as an array.
`static InetAddress[]` | `getAllByName(String host)` Answer the IP addresses of a named host.
`static InetAddress` | `getByName(String host)` Answers the address of a host, given a host string name.
`String` | `getHostAddress()` Answer the dotted string IP address representing this address.
`String` | `getHostName()` Answer the host name.
`static InetAddress` | `getLocalHost()` Answer the local host, if allowed by the security policy.
`int` | `hashCode()` Answer a hashcode for this IP address.

Methods inherited from class java.lang.Object
`clone, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InetAddress

    protected InetAddress(int address)

  Constructs an InetAddress, representing the `address`. The host name is not specified and will be looked up upon demand.
  Parameters:
    `address` - network address
  See Also:
    `getHostName`

### InetAddress

    protected InetAddress(int address,
                          String hostName)

  Constructs an InetAddress, representing the `address` and `hostName`.
  Parameters:
    `address` - network address
    `hostName` - network name of the host

Method Detail

### equals

    public boolean equals(Object obj)

  Compares this `InetAddress` against the specified object.
  Overrides:
    equals in class Object
  Parameters:
    `obj` - the object to be tested for equality
  Returns:
    boolean true, if the objects are equal

### getAddress

    public byte[] getAddress()

  Returns the IP address of this `InetAddress` as an array. The elements are in network order (the highest order address byte is in the zeroeth element).
  Returns:
    byte[] the address as a byte array

### getAllByName

    public static InetAddress[] getAllByName(String host)
                                      throws UnknownHostException

  Answer the IP addresses of a named host. The host name may either be a machine name or a dotted string IP address. If the host name is empty or null, an UnknownHostException is thrown. If the host name is a dotted IP string, an array with the corresponding single InetAddress is returned.
  Parameters:
    `host` - the hostName to be resolved to an address
  Returns:
    InetAddress[] an array of addresses for the host
  Throws:
    UnknownHostException - if the address lookup fails

### getByName

    public static InetAddress getByName(String host)
                                 throws UnknownHostException

  Answers the address of a host, given a host string name. The host string may be either a machine name or a dotted string IP address. If the latter, the hostName field will be determined upon demand.
  Parameters:
    `host` - the hostName to be resolved to an address
  Returns:
    InetAddress the InetAddress representing the host
  Throws:
    UnknownHostException - if the address lookup fails

### getHostAddress

    public String getHostAddress()

  Answer the dotted string IP address representing this address.
  Returns:
    String the corresponding dotted string IP address

### getHostName

    public String getHostName()

  Answer the host name.
  Returns:
    String the corresponding string name

### getLocalHost

    public static InetAddress getLocalHost()
                                    throws UnknownHostException

  Answer the local host, if allowed by the security policy. Otherwise, answer the loopback address which allows this machine to be contacted.
  Returns:
    InetAddress the InetAddress representing the local host
  Throws:
    UnknownHostException - if the address lookup fails

### hashCode

    public int hashCode()

  Answer a hashcode for this IP address.
  Overrides:
    hashCode in class Object
  Returns:
    int the hashcode

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

@ 1.1.1.1 log @import initial @ text @@