public class

HostAddresses

extends Object
implements Cloneable
java.lang.Object
   ↳ sun.security.mule.krb5.internal.HostAddresses

Class Overview

Implements the ASN.1 HostAddresses type.

HostAddresses -- NOTE: subtly different from rfc1510, -- but has a value mapping and encodes the same ::= SEQUENCE OF HostAddress HostAddress ::= SEQUENCE { addr-type [0] Int32, address [1] OCTET STRING }

This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.

Summary

Fields
private static boolean DEBUG
private HostAddress[] addresses
private int hashCode
Public Constructors
HostAddresses(HostAddress[] new_addresses)
HostAddresses()
HostAddresses(PrincipalName serverPrincipal)
HostAddresses(DerValue encoding)
Constructs a new HostAddresses object.
HostAddresses(InetAddress[] inetAddresses)
Creates a new HostAddresses instance from the supplied list of InetAddresses.
Public Methods
byte[] asn1Encode()
Encodes a HostAddresses object.
Object clone()
boolean equals(Object obj)
InetAddress[] getInetAddresses()
static HostAddresses getLocalAddresses()
Returns all the IP addresses of the local host.
int hashCode()
boolean inList(HostAddress addr)
static HostAddresses parse(DerInputStream data, byte explicitTag, boolean optional)
Parse (unmarshal) a HostAddresses from a DER input stream.
void writeAddrs(CCacheOutputStream cos)
Writes data field values in HostAddresses in FCC format to a CCacheOutputStream.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private static boolean DEBUG

private HostAddress[] addresses

private int hashCode

Public Constructors

public HostAddresses (HostAddress[] new_addresses)

Parameters
new_addresses
Throws
IOException

public HostAddresses ()

Throws
UnknownHostException

public HostAddresses (PrincipalName serverPrincipal)

Parameters
serverPrincipal
Throws
KrbException
UnknownHostException

public HostAddresses (DerValue encoding)

Constructs a new HostAddresses object.

Parameters
encoding A single DER-encoded value.
Throws
Asn1Exception if an error occurs while decoding an ASN1 encoded data.
IOException if an I/O error occurs while reading encoded data.

public HostAddresses (InetAddress[] inetAddresses)

Creates a new HostAddresses instance from the supplied list of InetAddresses.

Parameters
inetAddresses

Public Methods

public byte[] asn1Encode ()

Encodes a HostAddresses object.

Returns
  • byte array of encoded HostAddresses object.
Throws
Asn1Exception if an error occurs while decoding an ASN1 encoded data.
IOException if an I/O error occurs while reading encoded data.

public Object clone ()

public boolean equals (Object obj)

Parameters
obj

public InetAddress[] getInetAddresses ()

public static HostAddresses getLocalAddresses ()

Returns all the IP addresses of the local host.

Throws
IOException

public int hashCode ()

public boolean inList (HostAddress addr)

Parameters
addr

public static HostAddresses parse (DerInputStream data, byte explicitTag, boolean optional)

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.
IOException

public void writeAddrs (CCacheOutputStream cos)

Writes data field values in HostAddresses in FCC format to a CCacheOutputStream.

Parameters
cos A CCacheOutputStream to be written to.
Throws
IOException if an I/O exception occurs.