com.novell.service.session.xplat
Class Address

java.lang.Object
  |
  +--com.novell.service.session.xplat.Address

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

Provides NetWare address types, constructors for creating an addess, and methods for manipulating addresses.


Field Summary
static int TYPE_ASP
          NetWare address tupe is ASP.
static int TYPE_DDP
          NetWare address tupe is DDP.
static int TYPE_IPX
          NetWare address tupe is IPX.
static int TYPE_NONE
          No NetWare address tupe provided.
static int TYPE_TCP
          NetWare address tupe is TCP.
static int TYPE_TCP6
          NetWare address tupe is TCP6.
static int TYPE_UDP
          NetWare address tupe is UDP.
static int TYPE_UDP6
          NetWare address tupe is UDP6.
static int TYPE_WILD
          NetWare address tupe is WILD.
 
Constructor Summary
Address(java.net.InetAddress address)
          Construct an Address using an InetAddress.
Address(int type, byte[] address)
          Constructs an address consisting of a type and a byte array.
Address(java.lang.String addressString)
          Constructs an address from a String consisting of a type and a byte array.
 
Method Summary
 byte[] getAddress()
          Returns the raw address as a byte array.
 int getType()
          Returns the address type.
 void setAddress(java.net.InetAddress address)
          Sets the address as an InetAddress.
 void setAddress(int type, byte[] address)
          Sets the NetWare address and it's type.
 java.lang.String toString()
          Returns a string representation of this address.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NONE

public static final int TYPE_NONE
No NetWare address tupe provided.

(TYPE_NONE = 0x00000000)


TYPE_IPX

public static final int TYPE_IPX
NetWare address tupe is IPX.

(TYPE_NONE = 0x00000001)

Format of address: nn nn nn nn aa aa aa aa aa aa pp pp where nn is a network address byte, aa is a node address byte and pp is a port

TYPE_DDP

public static final int TYPE_DDP
NetWare address tupe is DDP.

(TYPE_IPX = 0x00000003)


TYPE_ASP

public static final int TYPE_ASP
NetWare address tupe is ASP.

(TYPE_ASP = 0x00000004)


TYPE_UDP

public static final int TYPE_UDP
NetWare address tupe is UDP.

(TYPE_UDP = 0x00000008)

Format of address: pp pp aa aa aa aa where pp is a port byte and aa is an address byte.

TYPE_TCP

public static final int TYPE_TCP
NetWare address tupe is TCP.

(TYPE_TCP = 0x00000009)


TYPE_UDP6

public static final int TYPE_UDP6
NetWare address tupe is UDP6.

(TYPE_UDP6 = 0x0000000A)


TYPE_TCP6

public static final int TYPE_TCP6
NetWare address tupe is TCP6.

(TYPE_TCP6 = 0x0000000B)


TYPE_WILD

public static final int TYPE_WILD
NetWare address tupe is WILD.

(TYPE_WILD = 0x00008000)

Constructor Detail

Address

public Address(int type,
               byte[] address)
Constructs an address consisting of a type and a byte array.
Parameters:
type - The address type as an int.
address - The raw address as a byte array.

Address

public Address(java.net.InetAddress address)
Construct an Address using an InetAddress.
Parameters:
address - The InetAddress used in constructing the Address.

Address

public Address(java.lang.String addressString)
Constructs an address from a String consisting of a type and a byte array.
Parameters:
String - The address type in the form: type address where: type is ipx, ddp, asp, udp, tcp, udp6 or tcp6 address is a sequence of byte values.
Method Detail

getAddress

public byte[] getAddress()
Returns the raw address as a byte array.
Returns:
A byte array containing the raw address.

getType

public int getType()
Returns the address type.
Returns:
The address type as an int.

setAddress

public void setAddress(int type,
                       byte[] address)
Sets the NetWare address and it's type.
Parameters:
type - The address type as an int.
address - The raw address as a byte array.

setAddress

public void setAddress(java.net.InetAddress address)
Sets the address as an InetAddress.
Parameters:
address - The address an an InetAddress.

toString

public java.lang.String toString()
Returns a string representation of this address.
Returns:
A string representation of the address.
Overrides:
toString in class java.lang.Object