com.rsa.certj.provider.pki.cmp

Class TypeAndValue

java.lang.Object
  |
  +--com.rsa.certj.provider.pki.cmp.TypeAndValue

public class TypeAndValue
extends Object

This class represents an generic type and value pair such as InfoTypeAndValue defined in rfc2510 as follows.

   InfoTypeAndValue ::= SEQUENCE {
       infoType               OBJECT IDENTIFIER,
       infoValue              ANY DEFINED BY infoType  OPTIONAL
   }
 

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


Constructor Summary

TypeAndValue(byte[] type, int typeOffset, int typeLen, byte[] value, int valueOffset, int valueLen)

Constructs a TypeAndValue object whose type component is provided in the type array, beginning at typeOffset for the typeLen number of bytes, and whose value component is provided in the value array, starting at valueOffset for the valueLen number of bytes.

 

Method Summary

 boolean

equals(Object obj)

Indicates whether this object and obj contain the same TypeAndValue object.

 byte[]

getType()

Returns a byte array holding the type of this object.

 byte[]

getValue()

Returns a byte array holding the value of this object.

 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeAndValue

public TypeAndValue(byte[] type,
                    int typeOffset,
                    int typeLen,
                    byte[] value,
                    int valueOffset,
                    int valueLen)
             throws CMPException
Constructs a TypeAndValue object whose type component is provided in the type array, beginning at typeOffset for the typeLen number of bytes, and whose value component is provided in the value array, starting at valueOffset for the valueLen number of bytes.

Parameters

         type  

A byte array that contains the type component.

         typeOffset  

An int indicating the starting offset in the type array.

         typeLen  

An int indicating the number of bytes used in the type array.

         value  

A byte array that contains the value component.

         valueOffset  

An int indicating the starting offset in the value array.

         valueLen  

An int indicating the number of bytes used in the value array.

Throws

CMPException - If the type argument is null.
Method Detail

getType

public byte[] getType()
Returns a byte array holding the type of this object.

Returns

A byte array holding the type of this object.

getValue

public byte[] getValue()
Returns a byte array holding the value of this object.

Returns

A byte array holding the value of this object.

equals

public boolean equals(Object obj)
Indicates whether this object and obj contain the same TypeAndValue object.

Overrides

equals in class Object

Parameters

         obj  

An Object object that this object is compared against.

Returns

A boolean value indicating whether the two objects are equal.


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