APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.krb5.internal

public Class AuthorizationData

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
sun.security.util.*, sun.security.krb5.Asn1Exception, java.util.ArrayList, java.io.IOException, sun.security.krb5.internal.ccache.CCacheOutputStream

In RFC4120, the ASN.1 AuthorizationData is defined as: AuthorizationData ::= SEQUENCE OF SEQUENCE { ad-type [0] Int32, ad-data [1] OCTET STRING } Here, two classes are used to implement it and they can be represented as follows: AuthorizationData ::= SEQUENCE OF AuthorizationDataEntry AuthorizationDataEntry ::= SEQUENCE { ad-type[0] Int32, ad-data[1] OCTET STRING }

Field Summary

Modifier and TypeField and Description
private AuthorizationDataEntry[]

Constructor Summary

AccessConstructor and Description
private
public
public
public
AuthorizationData(DerValue
a single DER-encoded value.
der
)

Constructs a new AuthorizationData, instance.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

byte array of encoded AuthorizationData object.
asn1Encode
()

Encodes an AuthorizationData object.

public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

public int
public AuthorizationDataEntry
item(int i)

public static AuthorizationData

Returns:

an instance of AuthorizationData.
parse
(DerInputStream
the Der input stream value, which contains one or more marshaled value.
data
,
byte
tag number.
explicitTag
,
boolean
indicates if this data field is optional
optional
)

Parse (unmarshal) an AuthorizationData object from a DER input stream.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
writeAuth(CCacheOutputStream
a CCacheOutputStream to be written to.
cos
)

Writes AuthorizationData data fields to a output stream.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

entryback to summary
private AuthorizationDataEntry[] entry

Constructor Detail

AuthorizationDataback to summary
private AuthorizationData()
AuthorizationDataback to summary
public AuthorizationData(AuthorizationDataEntry[] new_entries) throws IOException
AuthorizationDataback to summary
public AuthorizationData(AuthorizationDataEntry new_entry)
AuthorizationDataback to summary
public AuthorizationData(DerValue der) throws Asn1Exception, IOException

Constructs a new AuthorizationData, instance.

Parameters
der:DerValue

a single DER-encoded value.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.

Method Detail

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

Encodes an AuthorizationData object.

Returns:byte[]

byte array of encoded AuthorizationData object.

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

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

countback to summary
public int count()
itemback to summary
public AuthorizationDataEntry item(int i)
parseback to summary
public static AuthorizationData parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException

Parse (unmarshal) an AuthorizationData object from a DER input stream. This form of parsing might be used when expanding a value which is part of a constructed sequence and uses explicitly tagged type.

Parameters
data:DerInputStream

the Der input stream value, which contains one or more marshaled value.

explicitTag:byte

tag number.

optional:boolean

indicates if this data field is optional

Returns:AuthorizationData

an instance of AuthorizationData.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

writeAuthback to summary
public void writeAuth(CCacheOutputStream cos) throws IOException

Writes AuthorizationData data fields to a output stream.

Parameters
cos:CCacheOutputStream

a CCacheOutputStream to be written to.

Exceptions
IOException:
if an I/O exception occurs.