| java.lang.Object |
| ↳ |
sun.security.mule.krb5.internal.HostAddress |
Class Overview
Implements the ASN.1 HostAddress type.
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
| Public Constructors |
|
|
HostAddress()
|
|
|
HostAddress(int new_addrType, byte[] new_address)
Creates a HostAddress from the specified address and address type.
|
|
|
HostAddress(InetAddress inetAddress)
|
|
|
HostAddress(DerValue encoding)
Constructs a host address from a single DER-encoded value.
|
| Public Methods |
|
byte[]
|
asn1Encode()
Encodes a HostAddress object.
|
|
Object
|
clone()
|
|
boolean
|
equals(Object obj)
|
|
InetAddress
|
getInetAddress()
Gets the InetAddress of this HostAddress.
|
|
int
|
hashCode()
|
|
static
HostAddress
|
parse(DerInputStream data, byte explicitTag, boolean optional)
Parses (unmarshal) a host address from a DER input stream.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Fields
private
static
final
boolean
DEBUG
private
static
InetAddress
localInetAddress
Public Constructors
public
HostAddress
(int new_addrType, byte[] new_address)
Creates a HostAddress from the specified address and address type.
Parameters
| new_addrType
| The value of the address type which matches the defined
address family constants in the Berkeley Standard
Distributions of Unix. |
| new_address
| Network address. |
Throws
| KrbApErrException
| if address type and address length do not match defined value.
|
| UnknownHostException
| |
public
HostAddress
(InetAddress inetAddress)
public
HostAddress
(DerValue encoding)
Constructs a host address from a single DER-encoded value.
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 Methods
public
byte[]
asn1Encode
()
Encodes a HostAddress object.
Returns
- a byte array of encoded HostAddress 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
boolean
equals
(Object obj)
public
InetAddress
getInetAddress
()
Gets the InetAddress of this HostAddress.
Returns
- the IP address for this specified host.
public
static
HostAddress
parse
(DerInputStream data, byte explicitTag, boolean optional)
Parses (unmarshal) a host address 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 HostAddress.
Throws
| Asn1Exception
| on error. |
| IOException
| if an I/O error occurs while reading encoded data. |