01: package org.bouncycastle.sasn1;
02:
03: import java.io.InputStream;
04:
05: /**
06: * @deprecated use corresponsding classes in org.bouncycastle.asn1.
07: */
08: public abstract class Asn1Object {
09: protected int _baseTag;
10: protected int _tagNumber;
11: protected InputStream _contentStream;
12:
13: protected Asn1Object(int baseTag, int tagNumber,
14: InputStream contentStream) {
15: this ._baseTag = baseTag;
16: this ._tagNumber = tagNumber;
17: this ._contentStream = contentStream;
18: }
19:
20: /**
21: * Return true if this object is a constructed one.
22: *
23: * @return true if this object is constructed.
24: */
25: public boolean isConstructed() {
26: return (_baseTag & BerTag.CONSTRUCTED) != 0;
27: }
28:
29: /**
30: * Return the tag number for this object.
31: *
32: * @return the tag number.
33: */
34: public int getTagNumber() {
35: return _tagNumber;
36: }
37:
38: /**
39: * Return an input stream representing the content bytes of the object.
40: *
41: * @return content stream.
42: */
43: public InputStream getRawContentStream() {
44: return _contentStream;
45: }
46: }
|