1 7 8 9 package org.enhydra.oyster.cms; 10 11 import org.enhydra.oyster.exception.SMIMEException; 12 import org.enhydra.oyster.der.DERSequencePr; 13 import org.enhydra.oyster.der.DERObjectIdentifier; 14 15 16 29 public class Attribute extends DERSequencePr { 30 31 34 private int valueIndicator = 0; 35 36 49 public Attribute (String id0, String typeOfAttribute0) throws SMIMEException 50 { 51 DERObjectIdentifier temp = new DERObjectIdentifier(id0, typeOfAttribute0); this.addContent(temp.getDEREncoded()); } 54 55 65 public Attribute (int[] arrayID0) throws SMIMEException 66 { 67 DERObjectIdentifier temp = new DERObjectIdentifier(arrayID0); this.addContent(temp.getDEREncoded()); } 70 71 76 public void addContent (byte[] parameter0) throws SMIMEException { 77 super.addContent(parameter0); 78 valueIndicator++; 79 } 80 81 87 public byte[] getDEREncoded () throws SMIMEException { 88 if (valueIndicator == 0) 89 throw new SMIMEException(this, 1017); 90 return super.getDEREncoded(); 91 } 92 93 } 94 95 96 97 | Popular Tags |