1 7 8 9 package org.enhydra.oyster.cms; 10 11 import org.enhydra.oyster.exception.SMIMEException; 12 import org.enhydra.oyster.der.DERObjectIdentifier; 13 import org.enhydra.oyster.der.DERSet; 14 15 16 21 public class ContentTypeAttribute extends Attribute { 22 23 36 public ContentTypeAttribute (String id0, String typeConstruction0) throws SMIMEException 37 { 38 super("ID_CONTENTTYPE", "NAME_STRING"); 39 DERObjectIdentifier temp = new DERObjectIdentifier(id0, typeConstruction0); DERSet contType = new DERSet(); 41 contType.addContent(temp.getDEREncoded()); 42 super.addContent(contType.getDEREncoded()); 43 } 44 45 55 public ContentTypeAttribute (int[] arrayID0) throws SMIMEException 56 { 57 super("ID_CONTENTTYPE", "NAME_STRING"); 58 DERObjectIdentifier temp = new DERObjectIdentifier(arrayID0); DERSet contType = new DERSet(); 60 contType.addContent(temp.getDEREncoded()); 61 super.addContent(contType.getDEREncoded()); 62 } 63 } 64 65 66 67 | Popular Tags |