netP5
Class NetAddress

java.lang.Object
  extended by netP5.NetAddress

public class NetAddress
extends Object

NetAddress is an Object that contains an inetaddress of an remote internet address, consisting of an ip address and a port number.

Author:
andreas schlegel

Field Summary
 String name
           
 
Constructor Summary
NetAddress(InetAddress theInetAddress, int thePort)
           
NetAddress(NetAddress theNetAddress)
           
NetAddress(String theAddress, int thePort)
           
 
Method Summary
 String address()
          returns the remote ip address as string
 InetAddress inetaddress()
           
 boolean isvalid()
          check if the netAddress is valid.
 int port()
          returns the remote port number
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public String name
Constructor Detail

NetAddress

public NetAddress(String theAddress,
                  int thePort)
Parameters:
theAddress - String
thePort - int

NetAddress

public NetAddress(NetAddress theNetAddress)

NetAddress

public NetAddress(InetAddress theInetAddress,
                  int thePort)
Parameters:
theInetAddress - InetAddress
thePort - int
Method Detail

inetaddress

public InetAddress inetaddress()
Returns:
InetAddress

address

public String address()
returns the remote ip address as string

Returns:
String

port

public int port()
returns the remote port number

Returns:
int

isvalid

public boolean isvalid()
check if the netAddress is valid. this is true if the remote ip address was found.

Returns:
boolean

toString

public String toString()
Overrides:
toString in class Object


processing library oscP5 by Andreas Schlegel. (c) 2004-2012