krb5.lib
Class HostAddress

java.lang.Object
  extended by krb5.lib.HostAddress
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

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

Class Description : Provides the host address information. A modified version of the code obtained from the Open Group Research Institute.

Version:
1.1
Author:
Bojan Pajkovski
See Also:
Serialized Form

Field Summary
 byte[] address
          Address
 int addrType
          Address type
 
Constructor Summary
HostAddress()
          Class constructor specifying the default address type to Krb5.ADDRTYPE_INET
HostAddress(java.net.InetAddress inetAddress)
          Class constructor specifying the InetAddress
HostAddress(int new_addrType, byte[] new_address)
          Class constructor specifying the address type and the address
 
Method Summary
 java.lang.Object clone()
          This clone a copy of the object
 boolean equals(HostAddress h)
          Compares host addresses
static byte[] getLocalInetAddress()
          Get the local inet address
static void refreshLocalInetAddress()
          Refresh the local inet address
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addrType

public int addrType
Address type


address

public byte[] address
Address

Constructor Detail

HostAddress

public HostAddress()
            throws java.net.UnknownHostException
Class constructor specifying the default address type to Krb5.ADDRTYPE_INET

Throws:
java.net.UnknownHostException

HostAddress

public HostAddress(int new_addrType,
                   byte[] new_address)
Class constructor specifying the address type and the address

Parameters:
new_addrType - int
new_address - byte[]

HostAddress

public HostAddress(java.net.InetAddress inetAddress)
Class constructor specifying the InetAddress

Parameters:
inetAddress - InetAddress
Method Detail

clone

public java.lang.Object clone()
This clone a copy of the object

Overrides:
clone in class java.lang.Object
Returns:
Object
See Also:
Object.clone()

equals

public boolean equals(HostAddress h)
Compares host addresses

Parameters:
h - HostAddress
Returns:
true - host addresses are the same
false - host addresses are not the same

refreshLocalInetAddress

public static void refreshLocalInetAddress()
                                    throws java.net.UnknownHostException
Refresh the local inet address

Throws:
java.net.UnknownHostException

getLocalInetAddress

public static byte[] getLocalInetAddress()
                                  throws java.net.UnknownHostException
Get the local inet address

Returns:
byte[]
Throws:
java.net.UnknownHostException