sun.security.mule.krb5.internal.util
Class KerberosFlags

java.lang.Object
  extended by sun.security.mule.krb5.internal.util.KerberosFlags
Direct Known Subclasses:
APOptions, KDCOptions, TicketFlags

public class KerberosFlags
extends Object

A wrapper class around sun.security.util.BitArray, so that KDCOptions, TicketFlags and ApOptions in krb5 classes can utilize some functions in BitArray classes. The data type is defined in RFC 4120 as: 5.2.8. KerberosFlags For several message types, a specific constrained bit string type, KerberosFlags, is used. KerberosFlags ::= BIT STRING (SIZE (32..MAX)) -- minimum number of bits shall be sent, -- but no fewer than 32

Author:
Yanni Zhang

Field Summary
protected static int BITS_PER_UNIT
           
 
Constructor Summary
KerberosFlags(boolean[] bools)
           
KerberosFlags(int length)
           
KerberosFlags(int length, byte[] a)
           
 
Method Summary
 byte[] asn1Encode()
          Writes the encoded data.
 boolean get(int index)
           
 void set(int index, boolean value)
           
 boolean[] toBooleanArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BITS_PER_UNIT

protected static final int BITS_PER_UNIT
See Also:
Constant Field Values
Constructor Detail

KerberosFlags

public KerberosFlags(int length)
              throws IllegalArgumentException
Throws:
IllegalArgumentException

KerberosFlags

public KerberosFlags(int length,
                     byte[] a)
              throws IllegalArgumentException
Throws:
IllegalArgumentException

KerberosFlags

public KerberosFlags(boolean[] bools)
Method Detail

set

public void set(int index,
                boolean value)

get

public boolean get(int index)

toBooleanArray

public boolean[] toBooleanArray()

asn1Encode

public byte[] asn1Encode()
                  throws IOException
Writes the encoded data.

Returns:
an byte array of encoded KDCOptions.
Throws:
IOException - if an I/O error occurs while reading encoded data.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.