Home | History | Annotate | Download | only in cms
      1 package org.bouncycastle.cms;
      2 
      3 import java.io.IOException;
      4 import java.io.InputStream;
      5 import java.io.OutputStream;
      6 
      7 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
      8 import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
      9 
     10 /**
     11  * a class representing null or absent content.
     12  */
     13 public class CMSAbsentContent
     14     implements CMSTypedData, CMSReadable
     15 {
     16     private final ASN1ObjectIdentifier type;
     17 
     18     public CMSAbsentContent()
     19     {
     20         this(CMSObjectIdentifiers.data);
     21     }
     22 
     23     public CMSAbsentContent(
     24         ASN1ObjectIdentifier type)
     25     {
     26         this.type = type;
     27     }
     28 
     29     public InputStream getInputStream()
     30     {
     31         return null;
     32     }
     33 
     34     public void write(OutputStream zOut)
     35         throws IOException, CMSException
     36     {
     37         // do nothing
     38     }
     39 
     40     public Object getContent()
     41     {
     42         return null;
     43     }
     44 
     45     public ASN1ObjectIdentifier getContentType()
     46     {
     47         return type;
     48     }
     49 }
     50