KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > oyster > cms > ContentTypeIdentifier


1 /*
2  * Title: Oyster Project
3  * Description: S/MIME email sending capabilities
4  * @Author Vladimir Radisic
5  * @Version 2.1.5
6  */

7
8
9 package org.enhydra.oyster.cms;
10
11 import org.enhydra.oyster.exception.SMIMEException;
12 import org.enhydra.oyster.der.DERObjectIdentifier;
13
14
15 /**
16  * ContentTypeIdentifier class is DER encoded Content Type Identifier represented in
17  * ASN.1 notation according to RFC2630.<BR>
18  * <BR>
19  * ContentType ::= OBJECT IDENTIFIER<BR>
20  */

21 public class ContentTypeIdentifier extends DERObjectIdentifier {
22
23 /**
24  * This constructor has two different forms, depend on parameter typeConstruction0,
25  * which can be: DOT_SEPARATED_ARRAY or NAME_STRING. If typeConstruction0 parameter
26  * is DOT_SEPARATED_ARRAY then id0 definition is represented by numbers separated
27  * with dots (example: "1.2.840.113549.1.7.1"). In case of NAME_STRING, id0
28  * definition is name of object identifier for content attribute (example: "ID_DATA").
29  * @param id0 defines Object Identifier in representation determined by second
30  * parameter - typeConstruction0.
31  * @param typeConstruction0 can take values DOT_SEPARATED_ARRAY and NAME_STRING
32  * @exception SMIMEException if wrong type of parameters are passed to the
33  * constructor. Also, it can be thrown from super class constructor.
34  */

35   public ContentTypeIdentifier (String JavaDoc id0, String JavaDoc typeConstruction0) throws SMIMEException
36   {
37     super(id0, typeConstruction0); // Finding apropriate identifier
38
}
39
40 /**
41  * Array of numbers is used for construction of desired attribute DER Object
42  * Identifier. All numbers in the array represent one number between dots in
43  * object identifier string.
44  * @param arrayID0 array of given numbers (example: for ID_DATA attributes,
45  * numbers are 1, 2, 840, 113549, 1, 7 and 1)
46  * @exception SMIMEException if wrong type of parameters are passed to the
47  * constructor. Also, it can be thrown from super class constructor.
48  */

49   public ContentTypeIdentifier (int[] arrayID0) throws SMIMEException
50   {
51     super(arrayID0); // Finding apropriate identifier
52
}
53 }
54
55
56
57
Popular Tags