com.ibm.security.krb5
Class HostAddresses
- java.lang.Object
com.ibm.security.krb5.HostAddresses
All implemented interfaces:
java.lang.Cloneable
- public class HostAddresses
- extends java.lang.Object
- implements java.lang.Cloneable
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 |
---|---|
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 |
---|---|
|
asn1Encode()
Encodes a
HostAddresses object.
|
|
clone()
|
|
equals(HostAddresses addrs)
|
|
getInetAddresses()
|
|
getLocalAddresses()
Returns all the IP addresses of the local host.
|
|
inList(HostAddress addr)
|
|
parse(com.ibm.security.util.DerInputStream data,byte explicitTag,boolean optional)
Parse (unmarshal) a
HostAddresses from a DER input stream.
|
|
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
- public HostAddress[] addresses
Constructor Detail
HostAddresses
- public HostAddresses(HostAddress[] new_addresses)
HostAddresses
- public HostAddresses()
- throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException
HostAddresses
- public HostAddresses(PrincipalName serverPrincipal)
- throws java.net.UnknownHostException
- KrbException
HostAddresses
- public HostAddresses(com.ibm.security.util.DerValue encoding)
- throws Asn1Exception
- java.io.IOException
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
- public HostAddresses(java.net.InetAddress[] inetAddresses)
Creates a new HostAddresses instance from the supplied list
of InetAddresses.
Method Detail
clone
- public java.lang.Object clone()
Overrides:
clone
in class java.lang.Object
inList
- public boolean inList(HostAddress addr)
equals
- public boolean equals(HostAddresses addrs)
asn1Encode
- public byte[] asn1Encode()
- throws Asn1Exception
- 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
- public static HostAddresses parse( com.ibm.security.util.DerInputStream data,
- byte explicitTag,
- boolean optional)
- throws Asn1Exception
- 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
- public void writeAddrs(CCacheOutputStream cos)
- 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
- public java.net.InetAddress[] getInetAddresses( )
getLocalAddresses
- public static HostAddresses getLocalAddresses( )
- throws java.io.IOException
Returns all the IP addresses of the local host.
Throws:
java.io.IOException
HostAddresses
object.