public class IpAddress extends Object implements PhysicalAddress
| Modifier and Type | Field and Description |
|---|---|
protected static Log |
log |
protected int |
size |
| Constructor and Description |
|---|
IpAddress() |
IpAddress(InetAddress i,
int p) |
IpAddress(InetSocketAddress sock_addr) |
IpAddress(int port) |
IpAddress(int port,
boolean set_default_host) |
IpAddress(String i,
int p) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Address o)
implements the java.lang.Comparable interface
|
IpAddress |
copy() |
boolean |
equals(Object obj) |
InetAddress |
getIpAddress() |
int |
getPort() |
int |
hashCode() |
void |
readExternal(ObjectInput in) |
void |
readFrom(DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
int |
size()
Returns serialized size of this address
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
void |
writeTo(DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
protected static final Log log
protected int size
public IpAddress()
public IpAddress(String i, int p) throws UnknownHostException
UnknownHostExceptionpublic IpAddress(InetAddress i, int p)
public IpAddress(int port)
public IpAddress(int port,
boolean set_default_host)
public IpAddress(InetSocketAddress sock_addr)
public final InetAddress getIpAddress()
public final int getPort()
public final int compareTo(Address o)
compareTo in interface Comparable<Address>o - - the Object to be comparedClassCastException - - if the specified object's type prevents it
from being compared to this Object.Comparablepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void writeTo(DataOutput out) throws Exception
StreamablewriteTo in interface StreamableExceptionpublic void readFrom(DataInput in) throws Exception
StreamablereadFrom in interface StreamableExceptionpublic int size()
Addresspublic IpAddress copy()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.