Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.util
Class InetAddrPort  view InetAddrPort download InetAddrPort.java

java.lang.Object
  extended byorg.mortbay.util.InetAddrPort
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class InetAddrPort
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

InetAddress and Port.


Field Summary
static java.lang.String __0_0_0_0
           
private  java.net.InetAddress _addr
           
private  boolean _addrIsHost
           
private  int _port
           
 
Constructor Summary
InetAddrPort()
           
InetAddrPort(java.net.InetAddress addr, int port)
          Constructor.
InetAddrPort(InetAddrPort address)
          Constructor.
InetAddrPort(int port)
          Constructor for a port on all local host address.
InetAddrPort(java.lang.String inetAddrPort)
          Constructor.
InetAddrPort(java.lang.String host, int port)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clone the InetAddrPort.
 boolean equals(java.lang.Object o)
          Equals.
 java.lang.String getHost()
          Get the Host.
 java.net.InetAddress getInetAddress()
          Get the IP address.
 int getPort()
          Get the port.
 int hashCode()
          Hash Code.
 void setHost(java.lang.String host)
          Set the Host.
 void setInetAddress(java.net.InetAddress addr)
          Set the IP address.
 void setPort(int port)
          Set the port.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

__0_0_0_0

public static final java.lang.String __0_0_0_0
See Also:
Constant Field Values

_addr

private java.net.InetAddress _addr

_addrIsHost

private boolean _addrIsHost

_port

private int _port
Constructor Detail

InetAddrPort

public InetAddrPort()

InetAddrPort

public InetAddrPort(int port)
Constructor for a port on all local host address.


InetAddrPort

public InetAddrPort(java.net.InetAddress addr,
                    int port)
Constructor.


InetAddrPort

public InetAddrPort(java.lang.String host,
                    int port)
             throws java.net.UnknownHostException
Constructor.


InetAddrPort

public InetAddrPort(java.lang.String inetAddrPort)
             throws java.net.UnknownHostException
Constructor.


InetAddrPort

public InetAddrPort(InetAddrPort address)
Constructor.

Method Detail

getHost

public java.lang.String getHost()
Get the Host.


setHost

public void setHost(java.lang.String host)
             throws java.net.UnknownHostException
Set the Host.


getInetAddress

public java.net.InetAddress getInetAddress()
Get the IP address.


setInetAddress

public void setInetAddress(java.net.InetAddress addr)
Set the IP address.


getPort

public int getPort()
Get the port.


setPort

public void setPort(int port)
Set the port.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


clone

public java.lang.Object clone()
Clone the InetAddrPort.


hashCode

public int hashCode()
Hash Code.


equals

public boolean equals(java.lang.Object o)
Equals.