2002/03/21 01:19:32
[org.ibex.core.git] / src / org / bouncycastle / asn1 / DERUnknownTag.java
1 package org.bouncycastle.asn1;
2
3 import java.io.*;
4
5 /**
6  * We insert one of these when we find a tag we don't recognise.
7  */
8 public class DERUnknownTag
9     extends DERObject
10 {
11     int         tag;
12     byte[]      data;
13
14     /**
15      * @param tag the tag value.
16      * @param data the octets making up the time.
17      */
18     public DERUnknownTag(
19         int     tag,
20         byte[]  data)
21     {
22         this.tag = tag;
23         this.data = data;
24     }
25
26     public int getTag()
27     {
28         return tag;
29     }
30
31     public byte[] getData()
32     {
33         return data;
34     }
35
36     void encode(
37         DEROutputStream  out)
38         throws IOException
39     {
40         out.writeEncoded(tag, data);
41     }
42 }