com.rsa.certj.crmf

Class NonStandardControl

java.lang.Object
  |
  +--com.rsa.certj.crmf.Control
        |
        +--com.rsa.certj.crmf.NonStandardControl
All Implemented Interfaces:
Cloneable, Serializable

public class NonStandardControl
extends Control
implements Cloneable, Serializable

This class holds any control. It cannot encode or decode data, it can only take in the encoded value and return it.

Copyright © RSA Security Inc., 2000-2001. All rights reserved.

See Also

Serialized Form

Fields inherited from class com.rsa.certj.crmf.Control
AUTHENTICATOR, NON_STANDARD, OLD_CERT_ID, PKI_ARCHIVE_OPTIONS, PKI_PUBLICATION_INFO, PROTOCOL_ENCR_KEY, REG_TOKEN
 

Constructor Summary

NonStandardControl()

The empty constructor.

NonStandardControl(byte[] oid, int oidOffset, int oidLen, byte[] valueDER, int valueOffset, int valueLen)

This constructor takes in the OID and encoded value.

 

Method Summary

 Object

clone()

Overrides the default clone method to get a deeper clone.

 boolean

equals(Object obj)

Returns true if this object and obj contain the same NonStandardControl, returns false otherwise.

 byte[]

getValue()

Gets the value of this control.

 void

setOID(byte[] oid, int oidOffset, int oidLen)

Sets the OID of this control.

 void

setValue(byte[] valueDER, int valueOffset, int valueLen)

Sets the value of this control.

 
Methods inherited from class com.rsa.certj.crmf.Control
compareOID, derEncodeControlLen, getControlType, getControlTypeString, getDEREncoding, getDERLen, getInstance, getInstance, getNextBEROffset, getOID, isControlType, setEnvironment
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonStandardControl

public NonStandardControl()
The empty constructor.

NonStandardControl

public NonStandardControl(byte[] oid,
                          int oidOffset,
                          int oidLen,
                          byte[] valueDER,
                          int valueOffset,
                          int valueLen)
This constructor takes in the OID and encoded value.

Parameters

         oid  

The byte array that contains the OID

         oidOffset  

Offset into oid

         oidLen  

Length of oid

         valueDER  

The DER encoding of the value

         valueOffset  

Offset into valueDER

         valueLen  

Length of valueDER

Method Detail

setOID

public void setOID(byte[] oid,
                   int oidOffset,
                   int oidLen)
Sets the OID of this control.

Parameters

         oid  

The byte array that contains the OID

         oidOffset  

Offset into oid

         oidLen  

Length of oid


setValue

public void setValue(byte[] valueDER,
                     int valueOffset,
                     int valueLen)
Sets the value of this control.

Parameters

         valueDER  

The DER encoding of the value

         valueOffset  

Offset into valueDER

         valueLen  

Length of valueDER


getValue

public byte[] getValue()
Gets the value of this control. This method gets the DER encoding of the value.

Returns

A new byte array that contains the DER encoding of the value.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides the default clone method to get a deeper clone.

Overrides

clone in class Control

Returns

A new NonStandardControl object, a copy of this object.

Throws

CloneNotSupportedException - If the cloning operation is not successful.

equals

public boolean equals(Object obj)
Returns true if this object and obj contain the same NonStandardControl, returns false otherwise.

Overrides

equals in class Control

Parameters

         obj  

The instance of NonStandardControl object

Returns

A boolean that indicates whether these objects are equal.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000