Top Description Fields Constructors Methods
sun.security.krb5.internal

public Class KRBError

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial
Imports
java.io.ObjectOutputStream, .IOException, .ObjectInputStream, sun.security.krb5.PrincipalName, .Checksum, .Asn1Exception, .Realm, .RealmException, sun.security.util.*, java.math.BigInteger, java.util.ArrayList, .Arrays, .List, .Objects, sun.security.krb5.internal.util.KerberosString

Implements the ASN.1 KRBError type.
KRB-ERROR       ::= [APPLICATION 30] SEQUENCE {
        pvno            [0] INTEGER (5),
        msg-type        [1] INTEGER (30),
        ctime           [2] KerberosTime OPTIONAL,
        cusec           [3] Microseconds OPTIONAL,
        stime           [4] KerberosTime,
        susec           [5] Microseconds,
        error-code      [6] Int32,
        crealm          [7] Realm OPTIONAL,
        cname           [8] PrincipalName OPTIONAL,
        realm           [9] Realm -- service realm --,
        sname           [10] PrincipalName -- service name --,
        e-text          [11] KerberosString OPTIONAL,
        e-data          [12] OCTET STRING OPTIONAL
}

METHOD-DATA     ::= SEQUENCE OF PA-DATA

TYPED-DATA      ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
        data-type       [0] Int32,
        data-value      [1] OCTET STRING OPTIONAL
}

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

Field Summary

Modifier and TypeField and Description
private PrincipalName
private Realm
private KerberosTime
private Integer
private Checksum
private byte[]
private int
private String
private int
private PAData[]
private int
pack-priv static final long
private PrincipalName
private KerberosTime
private Integer

Constructor Summary

AccessConstructor and Description
public
KRBError(APOptions new_apOptions, KerberosTime new_cTime, Integer new_cuSec, KerberosTime new_sTime, Integer new_suSec, int new_errorCode, PrincipalName new_cname, PrincipalName new_sname, String new_eText, byte[] new_eData)

public
KRBError(APOptions new_apOptions, KerberosTime new_cTime, Integer new_cuSec, KerberosTime new_sTime, Integer new_suSec, int new_errorCode, PrincipalName new_cname, PrincipalName new_sname, String new_eText, byte[] new_eData, Checksum new_eCksum)

public
KRBError(byte[] data)

public
KRBError(DerValue encoding)

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the byte array of encoded KRBError object.
asn1Encode
()

Encodes an KRBError object.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public final Integer
public final Realm
public final KerberosTime
public final int
public final String
public final PAData[]
public final Integer
public final KerberosTime
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private void
init(DerValue
a DER-encoded data.
encoding
)

Initializes a KRBError object.

private void
parseEData(byte[] data)

private void
parsePAData(byte[]
the data block
data
)

Try parsing the data as a sequence of PA-DATA.

private void
private void
showDebug()

For debug use only

private void
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

cnameback to summary
private PrincipalName cname
crealmback to summary
private Realm crealm
cTimeback to summary
private KerberosTime cTime
cuSecback to summary
private Integer cuSec
eCksumback to summary
private Checksum eCksum
eDataback to summary
private byte[] eData
errorCodeback to summary
private int errorCode
eTextback to summary
private String eText
msgTypeback to summary
private int msgType
paback to summary
private PAData[] pa
pvnoback to summary
private int pvno
serialVersionUIDback to summary
pack-priv static final long serialVersionUID
snameback to summary
private PrincipalName sname
sTimeback to summary
private KerberosTime sTime
suSecback to summary
private Integer suSec

Constructor Detail

KRBErrorback to summary
public KRBError(APOptions new_apOptions, KerberosTime new_cTime, Integer new_cuSec, KerberosTime new_sTime, Integer new_suSec, int new_errorCode, PrincipalName new_cname, PrincipalName new_sname, String new_eText, byte[] new_eData) throws IOException, Asn1Exception
KRBErrorback to summary
public KRBError(APOptions new_apOptions, KerberosTime new_cTime, Integer new_cuSec, KerberosTime new_sTime, Integer new_suSec, int new_errorCode, PrincipalName new_cname, PrincipalName new_sname, String new_eText, byte[] new_eData, Checksum new_eCksum) throws IOException, Asn1Exception
KRBErrorback to summary
public KRBError(byte[] data) throws Asn1Exception, RealmException, KrbApErrException, IOException
KRBErrorback to summary
public KRBError(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException

Method Detail

asn1Encodeback to summary
public byte[] asn1Encode() throws Asn1Exception, IOException

Encodes an KRBError object.

Returns:byte[]

the byte array of encoded KRBError object.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getClientMicroSecondsback to summary
public final Integer getClientMicroSeconds()
getClientRealmback to summary
public final Realm getClientRealm()
getClientTimeback to summary
public final KerberosTime getClientTime()
getErrorCodeback to summary
public final int getErrorCode()
getErrorStringback to summary
public final String getErrorString()
getPAback to summary
public final PAData[] getPA()
getServerMicroSecondsback to summary
public final Integer getServerMicroSeconds()
getServerTimeback to summary
public final KerberosTime getServerTime()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
initback to summary
private void init(DerValue encoding) throws Asn1Exception, RealmException, KrbApErrException, IOException

Initializes a KRBError object.

Parameters
encoding:DerValue

a DER-encoded data.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
RealmException:
if an error occurs while parsing a Realm object.
KrbApErrException:
if the value read from the DER-encoded data stream does not match the pre-defined value.
IOException:
if an I/O error occurs while reading encoded data.
parseEDataback to summary
private void parseEData(byte[] data) throws IOException
parsePADataback to summary
private void parsePAData(byte[] data) throws IOException, Asn1Exception

Try parsing the data as a sequence of PA-DATA.

Parameters
data:byte[]

the data block

readObjectback to summary
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
showDebugback to summary
private void showDebug()

For debug use only

writeObjectback to summary
private void writeObject(ObjectOutputStream os) throws IOException