Top Description Fields Constructors Methods
sun.security.x509

public Class ReasonFlags

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.IOException, sun.security.util.*

Represent the CRL Reason Flags.

This extension, if present, defines the identifies the reason for the certificate revocation.

The ASN.1 syntax for this is:

ReasonFlags ::= BIT STRING {
   unused                  (0),
   keyCompromise           (1),
   cACompromise            (2),
   affiliationChanged      (3),
   superseded              (4),
   cessationOfOperation    (5),
   certificateHold         (6),
   privilegeWithdrawn      (7),
   aACompromise            (8) }
Author
Hemma Prafullchandra

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
private boolean[]
public static final String
public static final String
public static final String
public static final String
private static final String[]
public static final String
public static final String
public static final String
UNUSED

Reasons

Constructor Summary

AccessConstructor and Description
public
ReasonFlags(byte[]
the bits to be set for the ReasonFlags.
reasons
)

Create a ReasonFlags with the passed bit settings.

public
ReasonFlags(boolean[]
the bits to be set for the ReasonFlags.
reasons
)

Create a ReasonFlags with the passed bit settings.

public
ReasonFlags(BitArray
the bits to be set for the ReasonFlags.
reasons
)

Create a ReasonFlags with the passed bit settings.

public
ReasonFlags(DerInputStream
the DerInputStream to read the ReasonFlags from.
in
)

Create the object from the passed DER encoded value.

public
ReasonFlags(DerValue
the DerValue decoded from the stream.
derVal
)

Create the object from the passed DER encoded value.

Method Summary

Modifier and TypeMethod and Description
public void
encode(DerOutputStream
the DerOutputStream to write the extension to.
out
)

Implements sun.security.util.DerEncoder.encode.

Write the extension to the DerOutputStream.
public Object
get(String name)

Get the attribute value.

public boolean[]
getFlags()

Returns the reason flags as a boolean array.

private boolean
isSet(int
the position in the bit string to check.
position
)

Check if bit is set.

private static int
private void
set(int position, boolean val)

Set the bit at the specified position.

public void
set(String name, Object obj)

Set the attribute value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a printable representation of the ReasonFlags.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

AA_COMPROMISEback to summary
public static final String AA_COMPROMISE
AFFILIATION_CHANGEDback to summary
public static final String AFFILIATION_CHANGED
bitStringback to summary
private boolean[] bitString
CA_COMPROMISEback to summary
public static final String CA_COMPROMISE
CERTIFICATE_HOLDback to summary
public static final String CERTIFICATE_HOLD
CESSATION_OF_OPERATIONback to summary
public static final String CESSATION_OF_OPERATION
KEY_COMPROMISEback to summary
public static final String KEY_COMPROMISE
NAMESback to summary
private static final String[] NAMES
PRIVILEGE_WITHDRAWNback to summary
public static final String PRIVILEGE_WITHDRAWN
SUPERSEDEDback to summary
public static final String SUPERSEDED
UNUSEDback to summary
public static final String UNUSED

Reasons

Constructor Detail

ReasonFlagsback to summary
public ReasonFlags(byte[] reasons)

Create a ReasonFlags with the passed bit settings.

Parameters
reasons:byte[]

the bits to be set for the ReasonFlags.

ReasonFlagsback to summary
public ReasonFlags(boolean[] reasons)

Create a ReasonFlags with the passed bit settings.

Parameters
reasons:boolean[]

the bits to be set for the ReasonFlags.

ReasonFlagsback to summary
public ReasonFlags(BitArray reasons)

Create a ReasonFlags with the passed bit settings.

Parameters
reasons:BitArray

the bits to be set for the ReasonFlags.

ReasonFlagsback to summary
public ReasonFlags(DerInputStream in) throws IOException

Create the object from the passed DER encoded value.

Parameters
in:DerInputStream

the DerInputStream to read the ReasonFlags from.

Exceptions
IOException:
on decoding errors.
ReasonFlagsback to summary
public ReasonFlags(DerValue derVal) throws IOException

Create the object from the passed DER encoded value.

Parameters
derVal:DerValue

the DerValue decoded from the stream.

Exceptions
IOException:
on decoding errors.

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Write the extension to the DerOutputStream.

Parameters
out:DerOutputStream

the DerOutputStream to write the extension to.

Annotations
@Override
getback to summary
public Object get(String name) throws IOException

Get the attribute value.

getFlagsback to summary
public boolean[] getFlags()

Returns the reason flags as a boolean array.

isSetback to summary
private boolean isSet(int position)

Check if bit is set.

Parameters
position:int

the position in the bit string to check.

name2Indexback to summary
private static int name2Index(String name) throws IOException
setback to summary
private void set(int position, boolean val)

Set the bit at the specified position.

setback to summary
public void set(String name, Object obj) throws IOException

Set the attribute value.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a printable representation of the ReasonFlags.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object