1 7 8 package org.enhydra.oyster.der; 9 10 import org.enhydra.oyster.exception.SMIMEException; 11 12 20 public class DERClassContextSpecificPr extends DERObject { 21 22 26 private boolean structureIdentificator = false; 27 28 32 private int countOfAddings = 0; 33 34 41 public DERClassContextSpecificPr (int type0, boolean structured0) throws SMIMEException 42 { 43 super(structured0 ? (type0 | 160) : (type0 | 128)); 44 structureIdentificator = structured0; 45 } 46 47 54 protected void addContent (byte[] content0) throws SMIMEException { 55 if (structureIdentificator == false & countOfAddings > 0) 56 throw new SMIMEException(this, 1005); 57 super.addContent(content0); 58 countOfAddings++; 59 } 60 } 61 62 63 64 | Popular Tags |