com.ibm.security.krb5

Class HostAddresses

  1. java.lang.Object
  2. extended bycom.ibm.security.krb5.HostAddresses
All implemented interfaces:
java.lang.Cloneable

  1. public class HostAddresses
  2. extends java.lang.Object
  3. implements java.lang.Cloneable
Implements the ASN.1 HostAddresses type. HostAddresses ::= SEQUENCE OF SEQUENCE { addr-type[0] INTEGER, address[1] OCTET STRING }

This definition reflects the Network Working Group RFC 1510 specifications dated September 1993 and available at http://www.ietf.org/rfc/rfc1510.txt.


Field Summary

Modifier and Type Field and Description
  1. HostAddress[]
addresses

Constructor Summary

Constructor and Description
HostAddresses()
HostAddresses(com.ibm.security.util.DerValue encoding)
Constructs a new HostAddresses object.
HostAddresses(HostAddress[] new_addresses)
HostAddresses(java.net.InetAddress[] inetAddresses)
Creates a new HostAddresses instance from the supplied list of InetAddresses.
HostAddresses(PrincipalName serverPrincipal)

Method Summary

Modifier and Type Method and Description
  1. byte[]
asn1Encode()
Encodes a HostAddresses object.
  1. java.lang.Object
clone()
  1. boolean
equals(HostAddresses addrs)
  1. java.net.InetAddress[]
getInetAddresses()
  1. static
  2. HostAddresses
getLocalAddresses()
Returns all the IP addresses of the local host.
  1. boolean
inList(HostAddress addr)
  1. static
  2. HostAddresses
parse(com.ibm.security.util.DerInputStream data,byte explicitTag,boolean optional)
Parse (unmarshal) a HostAddresses from a DER input stream.
  1. void
writeAddrs(CCacheOutputStream cos)
Writes data field values in HostAddresses in FCC format to a CCacheOutputStream.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

addresses

  1. public HostAddress[] addresses

Constructor Detail

HostAddresses

  1. public HostAddresses(HostAddress[] new_addresses)

HostAddresses

  1. public HostAddresses()
  2. throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

HostAddresses

  1. public HostAddresses(PrincipalName serverPrincipal)
  2. throws java.net.UnknownHostException
  3. KrbException
Throws:
java.net.UnknownHostException

HostAddresses

  1. public HostAddresses(com.ibm.security.util.DerValue encoding)
  2. throws Asn1Exception
  3. java.io.IOException
Constructs a new HostAddresses object.
Parameters:
encoding - a single DER-encoded value.
Throws:
Asn1Exception - if an error occurs while decoding an ASN1 encoded data.
java.io.IOException - if an I/O error occurs while reading encoded data.

HostAddresses

  1. public HostAddresses(java.net.InetAddress[] inetAddresses)
Creates a new HostAddresses instance from the supplied list of InetAddresses.

Method Detail

clone

  1. public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

inList

  1. public boolean inList(HostAddress addr)

equals

  1. public boolean equals(HostAddresses addrs)

asn1Encode

  1. public byte[] asn1Encode()
  2. throws Asn1Exception
  3. java.io.IOException
Encodes a HostAddresses object.
Returns:
byte array of encoded HostAddresses object.
Throws:
Asn1Exception - if an error occurs while decoding an ASN1 encoded data.
java.io.IOException - if an I/O error occurs while reading encoded data.

parse

  1. public static HostAddresses parse( com.ibm.security.util.DerInputStream data,
  2. byte explicitTag,
  3. boolean optional)
  4. throws Asn1Exception
  5. java.io.IOException
Parse (unmarshal) a HostAddresses from a DER input stream. This form parsing might be used when expanding a value which is part of a constructed sequence and uses explicitly tagged type.
Parameters:
data - the Der input stream value, which contains one or more marshaled value.
explicitTag - tag number.
optional - indicates if this data field is optional.
Returns:
an instance of HostAddresses.
Throws:
Asn1Exception - if an Asn1Exception occurs.
java.io.IOException

writeAddrs

  1. public void writeAddrs(CCacheOutputStream cos)
  2. throws java.io.IOException
Writes data field values in HostAddresses in FCC format to a CCacheOutputStream.
Parameters:
cos - a CCacheOutputStream to be written to.
Throws:
java.io.IOException - if an I/O exception occurs.
See Also:

getInetAddresses

  1. public java.net.InetAddress[] getInetAddresses( )

getLocalAddresses

  1. public static HostAddresses getLocalAddresses( )
  2. throws java.io.IOException
Returns all the IP addresses of the local host.
Throws:
java.io.IOException