sun.security.mule.krb5.internal
Class AuthorizationData

java.lang.Object
  extended by sun.security.mule.krb5.internal.AuthorizationData
All Implemented Interfaces:
Cloneable

public class AuthorizationData
extends Object
implements Cloneable

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 }


Constructor Summary
AuthorizationData(AuthorizationDataEntry new_entry)
           
AuthorizationData(AuthorizationDataEntry[] new_entries)
           
AuthorizationData(sun.security.util.DerValue der)
          Constructs a new AuthorizationData, instance.
 
Method Summary
 byte[] asn1Encode()
          Encodes an AuthorizationData object.
 Object clone()
           
static AuthorizationData parse(sun.security.util.DerInputStream data, byte explicitTag, boolean optional)
          Parse (unmarshal) an AuthorizationData object from a DER input stream.
 String toString()
           
 void writeAuth(CCacheOutputStream cos)
          Writes AuthorizationData data fields to a output stream.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthorizationData

public AuthorizationData(AuthorizationDataEntry[] new_entries)
                  throws IOException
Throws:
IOException

AuthorizationData

public AuthorizationData(AuthorizationDataEntry new_entry)

AuthorizationData

public AuthorizationData(sun.security.util.DerValue der)
                  throws Asn1Exception,
                         IOException
Constructs a new AuthorizationData, instance.

Parameters:
der - 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.
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

asn1Encode

public byte[] asn1Encode()
                  throws Asn1Exception,
                         IOException
Encodes an AuthorizationData object.

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

parse

public static AuthorizationData parse(sun.security.util.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 - 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 AuthorizationData.
Throws:
Asn1Exception - if an error occurs while decoding an ASN1 encoded data.
IOException - if an I/O error occurs while reading encoded data.

writeAuth

public void writeAuth(CCacheOutputStream cos)
               throws IOException
Writes AuthorizationData data fields to a output stream.

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.