netcom.util
Class AddressPort

java.lang.Object
  extended bynetcom.util.AddressPort
All Implemented Interfaces:
java.io.Serializable

public class AddressPort
extends java.lang.Object
implements java.io.Serializable

Title: This is a class in Java 1.4 recreated here for 1.3 compatibility

Description: Tries to copy Java 1.4's InetSocketAddress

Company:

See Also:
Serialized Form

Constructor Summary
AddressPort(java.net.InetAddress address, int port)
          Constructor which takes a premade InetAddress and port
AddressPort(java.lang.String input_str)
          Constructor which takes a strin of the form AddressPort.toString() to create a new AddressPort object
AddressPort(java.lang.String hostname, int port)
          Constructor which takes a String and a port...
 
Method Summary
 java.net.InetAddress getAddress()
           
 java.lang.String getHostName()
           
 int getPort()
           
 java.lang.String toString()
          Override toString() in object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddressPort

public AddressPort(java.net.InetAddress address,
                   int port)
Constructor which takes a premade InetAddress and port

Parameters:
address - the premade InetAddress
port - the port

AddressPort

public AddressPort(java.lang.String hostname,
                   int port)
Constructor which takes a String and a port... tried to bind an InetAddress itself

Parameters:
hostname - the host's name (IP or dns)
port - the port

AddressPort

public AddressPort(java.lang.String input_str)
Constructor which takes a strin of the form AddressPort.toString() to create a new AddressPort object

Parameters:
input_str - the input .toString() string
Method Detail

getPort

public int getPort()

getAddress

public java.net.InetAddress getAddress()

getHostName

public java.lang.String getHostName()

toString

public java.lang.String toString()
Override toString() in object

Returns:
string of form "IP:port"